home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / toes114g.arc / TOESREQ.SLT < prev    next >
Text File  |  1991-05-21  |  89KB  |  2,565 lines

  1. // REMEMBER - maybe change file opening mode to a for append, not w for
  2. //   overwrite for final compilation ???? mmmm - maybe
  3.  
  4. // TOESREQ.SLT - written by Allan Marillier Feb/March/April 1991
  5. // this script file emulates the menus on Golden City OPUS, and allows
  6. // the user to simulate what is required. This is then written to file
  7. // TOES.REQ and will be automatically sent by the script TOES
  8.  
  9. // This assumes Xpert mode in Silver Express, and Novice mode in OPUS
  10. // as well as More set to NO in OPUS to keep scrolling, not pause for
  11. // each screen. This could be changed to read from a config file .... but
  12. // that's a future exercise, as is adding a read from config facility to TOES
  13. // to allow Xpert/novice mode wherever
  14.  
  15. // The relevant prompts, and responses are then written to files TOES.REQ
  16. // which is used from within the script TOES.SLT/SLC
  17.  
  18. // Prototypes : (not really, but C style prototyping does clarify matters)
  19.  
  20. // main()    COMPLETE
  21. // the main function
  22.  
  23. // bulletin_menu()   COMPLETE
  24. // this function emulates the opening bulletin menu, AFTER logon is complete
  25.  
  26. // main_menu()       COMPLETE
  27. // this function emulates the main menu
  28.  
  29. // message_menu()    COMPLETE
  30. // this function emulates the message menu
  31. // NOTE - as Xpress itself is a mail package system,
  32. // most mail menu facilities are NOT supported here. Only AREA, LIST,
  33. // SCAN and INQUIRE will be supported.
  34.  
  35. // file_menu()      COMPLETE
  36. // this function emulates the file menu
  37.  
  38. // statistics()    COMPLETE
  39. // this function emulates the statistics option
  40.  
  41. // config_menu()     COMPLETE
  42. // this function emulates the change setup menu
  43.  
  44. // list_users()     COMPLETE
  45. // this function emulates the list users facility
  46.  
  47. // version()    COMPLETE
  48. // this function emulates the OPUS version facility
  49.  
  50. // xpress()      COMPLETE
  51. // this function emulates the Silver Express opening screen
  52.  
  53. // config_password()     COMPLETE
  54. // this function emulates the change password facility
  55.  
  56. // config_expert_mode()   COMPLETE
  57. // this function emulates the config help level / expert mode etc
  58.  
  59. // config_nulls()   COMPLETE
  60. // this function emulates the null setting facility
  61.  
  62. // config_width()   COMPLETE
  63. // this function emulates the width setting facility
  64.  
  65. // config_length()     COMPLETE
  66. // this function emulates the change length facility
  67.  
  68. // config_tabs()      COMPLETE
  69. // this function emulates the config tabs facility
  70.  
  71. // config_more()      COMPLETE
  72. // this function emulates the config more facility
  73.  
  74. // config_video       COMPLETE
  75. // this function emulates the video type change facility
  76.  
  77. // config_screen_clear()      COMPLETE
  78. // this function emulates the config screen clear facility
  79.  
  80. // config_fs_edit()       COMPLETE
  81. // this function emulates the config full screen edit facility
  82.  
  83. // config_IBM_graphics()        COMPLETE
  84. // this function emulates the config IBM graphics facility
  85.  
  86. // config_city()      COMPLETE
  87. // this function emulates the config city facility
  88.  
  89. // config_user_list()     COMPLETE
  90. // this function emulates the config user list facility
  91.  
  92. // config_language()     COMPLETE
  93. // this function emulates the config language facility
  94.  
  95. // bulletin_display()    COMPLETE
  96. // this function emulates displaying a bulletin
  97.  
  98. // message_area()        COMPLETE
  99. // this function emulates the message area change facility
  100.  
  101. // message_list()        COMPLETE
  102. // this function emulates the message list facility
  103.  
  104. // message_scan()        COMPLETE
  105. // this function emulates the message area scan facility
  106.  
  107. // message_inquire()     COMPLETE
  108. // this function emulates the message area inquire facility
  109.  
  110. // message_area_show()      COMPLETE
  111. // this function displays the message areas
  112.  
  113. // file_area()        COMPLETE
  114. // this function simulates the file area change facility
  115.  
  116. // file_area_show()      COMPLETE
  117. // this function displays the available file areas
  118.  
  119. // file_locate()     COMPLETE
  120. // this function simulates the file area locate facility
  121.  
  122. // file_titles()     COMPLETE
  123. // this function emulates the file titles display facility
  124.  
  125. // file_type()       COMPLETE
  126. // this function emulates the type a file function
  127.  
  128. // file_upload()     COMPLETE
  129. // this function emulates the file upload facility
  130.  
  131. // file_download()     COMPLETE
  132. // this function emulates the file download facility
  133. // just one problem - it doesn't recognise Enter, and convert to Q to quit
  134. // from selecting the file transfer protocol
  135.  
  136. // file_statistics()    COMPLETE
  137. // this function emulates the file statistics facility
  138.  
  139. // file_raw()     COMPLETE
  140. // this function emulates the file raw list facility
  141.  
  142. // file_contents()     COMPLETE
  143. // this function emulates the file display contents facility
  144. // just one problem - the contents door asks "More ? Y/n" The script
  145. // only caters for one more screen full of info
  146.  
  147. // xpress_main()     COMPLETE
  148. // this function emulates the Silver Express main menu
  149.  
  150. // xpress_config()     COMPLETE
  151. // this function emulates the Silver Express config menu
  152.  
  153. // xpress_statistics()    COMPLETE
  154. // this function emulates the silver express statistics facility
  155.  
  156. // xpress_upload()    NOT USED AT PRESENT
  157. // this function indicates non support of xpress upload
  158.  
  159. // xpress_download()    NOT USED AT PRESENT
  160. // this function indicates non support of xpress download
  161.  
  162. // xpress_config_select()   COMPLETE
  163. // this function emulates the silver express config message select facility
  164.  
  165. // xpress_c_s_l()    COMPLETE
  166. // this function emulates the sx function to list all areas
  167.  
  168. // xpress_c_s_d()    COMPLETE
  169. // this function emulates sx's detailed area list
  170.  
  171. // xpress_c_s_s()    COMPLETE
  172. // this function emulates sx's list selected areas facility
  173.  
  174. // xpress_c_s_f()     COMPLETE
  175.  
  176. // xpress_c_s_c()    COMPLETE
  177. // this function emulates sx's message area change message pointer facility
  178.  
  179. // xpress_config_keywords()    COMPLETE
  180. // this function emulates the keyword selection facility
  181.  
  182. // xpress_config_k_l()     COMPLETE
  183. // this function lists defined keywords
  184.  
  185. // xpress_config_transfer()    COMPLETE
  186. // this function emulates setting the file transfer protocol
  187.  
  188. // xpress_config_archive()     COMPLETE
  189. // though Dave only supports ZModem, this function emulates the archive
  190.  
  191. // xpress_config_graphics()    COMPLETE
  192. // this function emulates toggling graphics mode on /off
  193.  
  194. // xpress_config_menu_hotkey()   COMPLETE
  195. // this function emulates toggling hotkeys on /off
  196.  
  197. // xpress_config_expert()    COMPLETE
  198. // this function emulates toggling expert / novice mode
  199.  
  200. // xpress_config_last()    COMPLETE
  201. // this function emulates sx's last usage date
  202.  
  203. // xpress_config_your()       COMPLETE
  204. // this function emulates sx's receive own mail facility
  205.  
  206. // wait_for_enter()     COMPLETE
  207. // this function causes a wait for Enter to be performed
  208.  
  209. // msg_fil_area()       COMPLETE
  210. // this function is used by both message_area and file_area, to eliminate
  211. // duplication of common code used in accepting an area number, or
  212. // accepting N, n, P, or p to move the area pointer. It uses the global
  213. // variable area_type as either "f" or "m" to determine what it's working on
  214.  
  215. // get_protocol()       COMPLETE
  216. // this function gets the file transfer protocol - to avoid duplication
  217. // of code in both file_upload and file_download
  218.  
  219. // valid_number(int lower, int upper)      COMPLETE
  220. // function to get a number between the upper and lower limits passed
  221. // s_80 and number are global variables, so I don't need to return them
  222.  
  223. // valid_choice(int one, int two, int thr, int fou, int fiv)     COMPLETE
  224. // function to get a Y or N response.
  225. // s_10 is a global variable, so doesn't need to be returned
  226.  
  227. // global variable definitions
  228. str s_80[80];
  229. str buffer[80];
  230. str s_10[10];
  231. str prompt[80];
  232. str main_prompt[11] = "Select:^M^J";
  233. str bulletin_prompt[11] = "Select:^M^J";
  234. str file_prompt[11] = "Select:^M^J";
  235. str message_prompt[29] = "Message number or SELECT:^M^J";
  236. str config_prompt[12] = "Select:^M^J";
  237. str xpress_x_prompt[28] = "Enter C, D, U, S, H, Q ?^M^J";
  238. str xpress_n_prompt[20] = "Enter Selection:^M^J";
  239. str xpress_prompt[28] = "Enter C, D, U, S, H, Q ?^M^J";
  240. int char;
  241. int kounter;
  242. int number;
  243. int m_area_number = 1;
  244. int f_area_number = 1;
  245. int toes_req_file;
  246. str area_type[1] = "f";
  247. int ok = 0;
  248. int protocol = 0;
  249.  
  250. main()
  251. {
  252.   toes_req_file = fopen("TOES.REQ","w");      // make the w into a for final
  253.   _scr_chk_key = 0;  // make Telix ignore keyboard for Esc to abort script
  254.   main_menu();
  255.   fclose(toes_req_file);
  256.   _scr_chk_key = 1;  // reset Esc checking
  257.   exittelix();   // return to DOS
  258. }
  259.  
  260. bulletin_menu()
  261. // this function emulates the opening bulletin menu, AFTER logon is complete
  262. // - ie. the one with all the bulletins
  263. {
  264.   do
  265.   {
  266.     clear_scr();
  267.     prints("  Bulletins  --  Bulletin 3 updated 24 December 1990  Please Read.");
  268.     prints("                                    ================");
  269.     prints("Allan, Please select the bulletin that you wish to read...");
  270.     prints("         H)elp on using the Opus Full Screen Editor - OpEd");
  271.     prints("         E)quipment used on-line");
  272.     prints("         1) The subscription system");
  273.     prints("         2) Hard drive space and new files! Updated 28 April 1989");
  274.     prints("         3) Sysops' wafflings (or messages from the Sysop!)");
  275.     prints("         4) To new FidoNet Sysops' - How to get a node number");
  276.     prints("         5) Special offer on modems to BBS users.");
  277.     prints(" ");
  278.     prints("     You may select this Bulletin Menu from the Main Menu as well.");
  279.     prints(" ");
  280.     prints("         Q)uit to BBS");
  281.     prints(" ");
  282.     prints("Select:");
  283.     char = 0;
  284.     char = toupper(inkeyw());
  285.     if ( (char >= 49) && (char <= 57) )   // dave only uses 1 - 5, E, H and Q
  286.     {
  287.       // selected 1 - 9
  288.       fputs(char,toes_req_file);
  289.       fputs("^M^J",toes_req_file);
  290.       fputs(bulletin_prompt,toes_req_file);
  291.       bulletin_display();
  292.       continue;
  293.     }
  294.     if (char == 69)   // Pressed E
  295.     {
  296.       fputs("E",toes_req_file);
  297.       fputs("^M^J",toes_req_file);
  298.       fputs(bulletin_prompt,toes_req_file);
  299.       bulletin_display();
  300.       continue;
  301.     }
  302.     if (char == 72)  // Pressed H
  303.     {
  304.       clear_scr();
  305.       prints("On line help displays are not supported from here.");
  306.       delay(20);
  307.       continue;
  308.     }
  309.     if (char == 81)   // pressed Q
  310.     {
  311.       fputs("Q",toes_req_file);
  312.       fputs("^M^J",toes_req_file);
  313.       fputs(main_prompt,toes_req_file);
  314.       break;
  315.     }
  316.   } while (1); // loop forever, or until Q is entered to exit
  317. }  // end function bulletin_menu
  318.  
  319. main_menu()
  320. // this function emulates the main menu
  321. {
  322.   do
  323.   {
  324.     clear_scr();
  325.     for (kounter = 0; kounter <= 9; kounter = kounter +1)
  326.       prints("");
  327.     prints("MAIN:                                   <TOESREQ : Esc to exit>");
  328.     prints("M)essage section   F)ile Section      G)oodbye (logoff)  S)tatistics");
  329.     prints("B)ulletin          O)pus Users Guide  C)hange setup      L)istUsers");
  330.     prints("V)ersion           E)xpress Reader    ?)HELP");
  331.     prints("Select: ");
  332.     char = 0;
  333.     char = toupper(inkeyw());
  334.     if (char == 27)  // Pressed Esc to exit
  335.     {
  336.       fputs("$FINISHED$^M^J",toes_req_file);
  337.       break;  // return to main(), then end the script
  338.     }
  339.     if (char == 77)  // Pressed M
  340.     {
  341.       fputs(char,toes_req_file);
  342.       fputs("^M^J",toes_req_file);
  343.       fputs(message_prompt,toes_req_file);
  344.       message_menu();
  345.       continue;
  346.     }
  347.     if (char == 70)  // Pressed F
  348.     {
  349.       fputs(char,toes_req_file);
  350.       fputs("^M^J",toes_req_file);
  351.       fputs(file_prompt,toes_req_file);
  352.       file_menu();
  353.       continue;
  354.     }
  355.     if (char == 71)  // Pressed G
  356.     {
  357.       clear_scr();
  358.       prints("The Goodbye facility is not supported in request files, as the");
  359.       prints(" TOES script will take care of the goodbye anyway.");
  360.       delay(20);
  361.       continue;
  362.     }
  363.     if (char == 83)  // Pressed S
  364.     {
  365.       fputs(char,toes_req_file);
  366.       fputs("^M^J",toes_req_file);
  367.       fputs(main_prompt,toes_req_file);
  368.       statistics();
  369.       delay(20);
  370.       continue;
  371.     }
  372.     if (char == 66)  // Pressed B
  373.     {
  374.       fputs(char,toes_req_file);
  375.       fputs("^M^J",toes_req_file);
  376.       fputs(bulletin_prompt,toes_req_file);
  377.       bulletin_menu();
  378.       continue;
  379.     }
  380.     if (char == 79)  // Pressed O
  381.     {
  382.       clear_scr();
  383.       prints("OPUS on line help not supported. For online help, ");
  384.       prints("  connect online and read it or download the relevant doc files.");
  385.       delay(20);
  386.       continue;
  387.     }
  388.     if (char == 67)  // Pressed C
  389.     {
  390.       fputs(char,toes_req_file);
  391.       fputs("^M^J",toes_req_file);
  392.       fputs(config_prompt,toes_req_file);
  393.       config_menu();
  394.       continue;
  395.     }
  396.     if (char == 76)  // Pressed L
  397.     {
  398.       fputs(char,toes_req_file);
  399.       fputs("^M^J",toes_req_file);
  400.       fputs("or type a partial name to match:^M^J",toes_req_file);
  401.       list_users();
  402.       continue;
  403.     }
  404.     if (char == 86)  // Pressed V
  405.     {
  406.       fputs(char,toes_req_file);
  407.       fputs("^M^J",toes_req_file);
  408.       fputs(main_prompt,toes_req_file);
  409.       version();
  410.       delay(20);
  411.       continue;
  412.     }
  413.     if (char == 69)  // Pressed E
  414.     {
  415.       fputs(char,toes_req_file);
  416.       fputs("^M^J",toes_req_file);
  417.       fputs(xpress_prompt,toes_req_file);
  418.       xpress();
  419.       continue;
  420.     }
  421.     if (char == 63)  // Pressed ?
  422.     {
  423.       clear_scr();
  424.       prints("On line help displays are not supported from here.");
  425.       delay(20);
  426.       continue;
  427.     }
  428.   } while (1); // loop forever, or until exit (via Esc)
  429. } // end function main_menu
  430.  
  431. message_menu()
  432. // this function emulates the message menu
  433. {
  434.   do
  435.   {
  436.     s_80 = "Area    ";
  437.     itos(m_area_number,s_10);
  438.     strcat(s_80,s_10);
  439.     strcat(s_80," ... ************** MESSAGE AREA NAME *****");
  440.     clear_scr();
  441.     prints("^M^J^M^J");
  442.     prints("[161] Highest: 161         <TOESREQ : Area List Scan Inquire only>");
  443.     prints(s_80);
  444.     prints("A)rea              M)AIN MENU         N)ext read msg     P)rior msg");
  445.     prints("C)urrent           E)nter message     R)eply             =)read non-stop");
  446.     prints("-)read original    +)read reply       L)ist (brief       S)can");
  447.     prints("I)nquire           G)oodbye (logoff)  K)ill message      U)pload");
  448.     prints("?)HELP");
  449.     prints("");
  450.     prints("Message number or SELECT:");
  451.     prints("");
  452.     prints("<TOESREQ : NOTE - as Silver Xpress itself is a mail package system,");
  453.     prints("  most mail menu facilities are NOT supported here. Only AREA, LIST,");
  454.     prints("  SCAN and INQUIRE will be supported. Use M to return to MAIN>");
  455.     char = 0;
  456.     char = toupper(inkeyw());
  457.     if (char == 77)  // Pressed M
  458.     {
  459.       fputs(char,toes_req_file);
  460.       fputs("^M^J",toes_req_file);
  461.       fputs(main_prompt,toes_req_file);
  462.       break;
  463.     }
  464.     if (char == 65)  // Pressed A
  465.     {
  466.       fputs(char,toes_req_file);
  467.       fputs("^M^J",toes_req_file);
  468.       fputs("Message area [Area #, N)ext, P)rior, ?)list]:^M^J",toes_req_file);
  469.       message_area();
  470.       continue;
  471.     }
  472.     if (char == 76)  // Pressed L
  473.     {
  474.       fputs(char,toes_req_file);
  475.       fputs("^M^J",toes_req_file);
  476.       fputs("Start with which message# ? 1^M^J",toes_req_file);
  477.       message_list();
  478.       continue;
  479.     }
  480.     if (char == 83)  // Pressed S
  481.     {
  482.       fputs(char,toes_req_file);
  483.       fputs("^M^J",toes_req_file);
  484.       fputs(message_prompt,toes_req_file);
  485.       message_scan();
  486.       continue;
  487.     }
  488.     if (char == 73)  // Pressed I
  489.     {
  490.       fputs(char,toes_req_file);
  491.       fputs("^M^J",toes_req_file);
  492.       fputs("Type what you want to find: ",toes_req_file);
  493.       message_inquire();
  494.       continue;
  495.     }
  496.   } while (1); // loop forever, or until exit (via M)
  497. } // end function message_menu
  498.  
  499. file_menu()
  500. // this function emulates the file menu
  501. {
  502.   do
  503.   {
  504.     s_80 = "Area    ";
  505.     itos(f_area_number,s_10);
  506.     strcat(s_80,s_10);
  507.     strcat(s_80," ... ************** FILE AREA NAME *****");
  508.     clear_scr();
  509.     prints("The FILES Section.");
  510.     prints(s_80);
  511.     prints("A)rea Change      L)ocate File      F)ile titles      T)ype (show)");
  512.     prints("G)oodbye          U)pload           D)ownload         S)tatistics");
  513.     prints("M)ain menu        R)aw dir display  C)ontents         ?)HELP");
  514.     prints("Select:");
  515.     char = 0;
  516.     char = toupper(inkeyw());
  517.     if (char == 77)  // Pressed M
  518.     {
  519.       fputs(char,toes_req_file);
  520.       fputs("^M^J",toes_req_file);
  521.       fputs(main_prompt,toes_req_file);
  522.       break;
  523.     }
  524.     if (char == 65)  // Pressed A
  525.     {
  526.       fputs(char,toes_req_file);
  527.       fputs("^M^J",toes_req_file);
  528.       fputs("File area [Area #, N)ext, P)rior, ?)list]:^M^J",toes_req_file);
  529.       file_area();
  530.       continue;
  531.     }
  532.     if (char == 76)  // Pressed L
  533.     {
  534.       fputs(char,toes_req_file);
  535.       fputs("^M^J",toes_req_file);
  536.       fputs("Locate what file (or description)?^M^J",toes_req_file);
  537.       file_locate();
  538.       continue;
  539.     }
  540.     if (char == 70)  // Pressed F
  541.     {
  542.       fputs(char,toes_req_file);
  543.       fputs("^M^J",toes_req_file);
  544.       fputs(file_prompt,toes_req_file);
  545.       file_titles();
  546.       continue;
  547.     }
  548.     if (char == 84)  // Pressed T
  549.     {
  550.       fputs(char,toes_req_file);
  551.       fputs("^M^J",toes_req_file);
  552.       fputs("Display what file? ^M^J",toes_req_file);
  553.       file_type();
  554.       continue;
  555.     }
  556.     if (char == 71)  // Pressed G
  557.     {
  558.       clear_scr();
  559.       prints("The Goodbye facility is not supported in request files, as the");
  560.       prints(" TOES script will take care of the goodbye anyway.");
  561.       delay(20);
  562.       continue;
  563.     }
  564.     if (char == 85)  // Pressed U
  565.     {
  566.       fputs(char,toes_req_file);
  567.       fputs("^M^J",toes_req_file);
  568.       fputs("Select:^M^J",toes_req_file);
  569.       file_upload();
  570.       continue;
  571.     }
  572.     if (char == 68)  // Pressed D
  573.     {
  574.       fputs(char,toes_req_file);
  575.       fputs("^M^J",toes_req_file);
  576.       fputs("Select:^M^J",toes_req_file);
  577.       file_download();
  578.       continue;
  579.     }
  580.     if (char == 83)  // Pressed S
  581.     {
  582.       fputs(char,toes_req_file);
  583.       fputs("^M^J",toes_req_file);
  584.       fputs(file_prompt,toes_req_file);
  585.       file_statistics();
  586.       continue;
  587.     }
  588.     if (char == 82)  // Pressed R
  589.     {
  590.       fputs(char,toes_req_file);
  591.       fputs("^M^J",toes_req_file);
  592.       fputs("File name mask:^M^J",toes_req_file);
  593.       file_raw();
  594.       continue;
  595.     }
  596.     if (char == 67)  // Pressed C
  597.     {
  598.       fputs(char,toes_req_file);
  599.       fputs("^M^J",toes_req_file);
  600.       fputs("Type the name of an archive:^M^J",toes_req_file);
  601.       file_contents();
  602.       continue;
  603.     }
  604.     if (char == 63)  // Pressed ?
  605.     {
  606.       clear_scr();
  607.       prints("File menu help not supported. For online help, ");
  608.       prints("  connect online and read it or download the relevant doc files.");
  609.       delay(20);
  610.       continue;
  611.     }
  612.   } while (1); // loop forever, or until exit (via M)
  613. } // end function file_menu
  614.  
  615. statistics()
  616. // this function emulates the statistics option
  617. {
  618.   clear_scr();
  619.   prints("Your statistics for Wed Feb 27 14:01:51 1991");
  620.   prints(" ");
  621.   prints("Last Time online                27-Feb-91 10:51am");
  622.   prints("TIME");
  623.   prints("  Time on line, this call.................          2 minutes");
  624.   prints("  Time remaining for this call............         87 minutes");
  625.   prints("  Time of previous calls today............         13 minutes");
  626.   prints("  Calls to date...........................        552");
  627.   prints("FILES");
  628.   prints("  UL (from you)...........................       4253 k-bytes");
  629.   prints("  DL (to you).............................      22333 k-bytes");
  630.   prints("  Download available......................        600 k-bytes");
  631.   prints("<*>");
  632.   prints("Listed in User list: YES  List City: YES  Last time on: YES");
  633.   prints("Current Language:  ENGLISH");
  634.   delay(20);
  635. } // end function statistics
  636.  
  637. config_menu()
  638. // this function emulates the change setup menu
  639. {
  640.   do
  641.   {
  642.     clear_scr();
  643.     prints("The CHANGE SETUP Section");
  644.     prints("^M^J^M^J");
  645.     prints("City...............................Johannesburg");
  646.     prints("");
  647.     prints("Help........NOVICE           Nulls.......0");
  648.     prints("scrn.Width..79               scrn.Length 24          Exp. Tabs...YES");
  649.     prints("More?.......NO               Video mode..TTY         Scrn. clear YES");
  650.     prints("IBM Chars...YES         Talker......NO");
  651.     prints("Listed in User list: YES  List City: YES  Last time on: YES");
  652.     prints("Current Language:  ENGLISH");
  653.     prints("^M^J^M^J");
  654.     prints("CHANGE :");
  655.     prints("P)assword        H)elp Level      N)ulls           W)idth");
  656.     prints("L)ength          T)abs            M)ore            V)ideo mode");
  657.     prints("S)creen clear    F)ull-scrn edit  I)BM graphics    C)ity");
  658.     prints("U)ser List       A)lterLanguage   Q)uit section    ?)HELP");
  659.     prints("Select:");
  660.     char = 0;
  661.     char = toupper(inkeyw());
  662.     if (char == 81)  // Pressed Q
  663.     {
  664.       fputs(char,toes_req_file);
  665.       fputs("^M^J",toes_req_file);
  666.       fputs(main_prompt,toes_req_file);
  667.       break;
  668.     }
  669.     if (char == 80)  // Pressed P
  670.     {
  671.       fputs(char,toes_req_file);
  672.       fputs("^M^J",toes_req_file);
  673.       fputs("Current password: ^M^J",toes_req_file);
  674.       config_password();
  675.       continue;
  676.     }
  677.     if (char == 72)  // Pressed H
  678.     {
  679.       fputs(char,toes_req_file);
  680.       fputs("^M^J",toes_req_file);
  681.       fputs("Help level: ^M^J",toes_req_file);
  682.       config_expert_mode();
  683.       continue;
  684.     }
  685.     if (char == 78)  // Pressed N
  686.     {
  687.       fputs(char,toes_req_file);
  688.       fputs("^M^J",toes_req_file);
  689.       fputs("Nulls (0-200): ^M^J",toes_req_file);
  690.       config_nulls();
  691.       continue;
  692.     }
  693.     if (char == 87)  // Pressed W
  694.     {
  695.       fputs(char,toes_req_file);
  696.       fputs("^M^J",toes_req_file);
  697.       fputs("Monitor width (20-132): ^M^J",toes_req_file);
  698.       config_width();
  699.       continue;
  700.     }
  701.     if (char == 76)  // Pressed L
  702.     {
  703.       fputs(char,toes_req_file);
  704.       fputs("^M^J",toes_req_file);
  705.       fputs("What number is on the TOP of your display?^M^J",toes_req_file);
  706.       config_length();
  707.       continue;
  708.     }
  709.     if (char == 84)  // Pressed T
  710.     {
  711.       fputs(char,toes_req_file);
  712.       fputs("^M^J",toes_req_file);
  713.       fputs(config_prompt,toes_req_file);
  714.       clear_scr();
  715.       prints("<TOESREQ : Tabs will be toggled ......ON/OFF>");
  716.       delay(10);
  717.       // config_tabs();
  718.       // function call not necessary - simple toggle from opus
  719.       continue;
  720.     }
  721.     if (char == 77)  // Pressed M
  722.     {
  723.       fputs(char,toes_req_file);
  724.       fputs("^M^J",toes_req_file);
  725.       fputs(config_prompt,toes_req_file);
  726.       clear_scr();
  727.       prints("<TOESREQ : More will be toggled ......ON/OFF>");
  728.       delay(10);
  729.       // config_more();
  730.       // function call not necessary - simple toggle from opus
  731.       continue;
  732.     }
  733.     if (char == 86)  // Pressed V
  734.     {
  735.       fputs(char,toes_req_file);
  736.       fputs("^M^J",toes_req_file);
  737.       fputs(config_prompt,toes_req_file);
  738.       config_video();
  739.       continue;
  740.     }
  741.     if (char == 83)  // Pressed S
  742.     {
  743.       fputs(char,toes_req_file);
  744.       fputs("^M^J",toes_req_file);
  745.       fputs(config_prompt,toes_req_file);
  746.       clear_scr();
  747.       prints("<TOESREQ : Screen Clear will be toggled ......ON/OFF>");
  748.       delay(10);
  749.       // config_screen_clear();
  750.       // function call not necessary - simple toggle from opus
  751.       continue;
  752.     }
  753.     if (char == 70)  // Pressed F
  754.     {
  755.       fputs(char,toes_req_file);
  756.       fputs("^M^J",toes_req_file);
  757.       fputs(config_prompt,toes_req_file);
  758.       clear_scr();
  759.       prints("<TOESREQ : Full Screen Edit will be toggled ......ON/OFF>");
  760.       config_fs_edit();
  761.       // function call not necessary - simple toggle from opus
  762.       // PROVIDED that graphics and screen clear are set to YES
  763.       continue;
  764.     }
  765.     if (char == 73)  // Pressed I
  766.     {
  767.       fputs(char,toes_req_file);
  768.       fputs("^M^J",toes_req_file);
  769.       fputs(config_prompt,toes_req_file);
  770.       clear_scr();
  771.       prints("<TOESREQ : IBM graphics will be toggled ......ON/OFF>");
  772.       delay(10);
  773.       // config_IBM_graphics();
  774.       // function call not necessary - simple toggle from opus
  775.       continue;
  776.     }
  777.     if (char == 67)  // Pressed C
  778.     {
  779.       fputs(char,toes_req_file);
  780.       fputs("^M^J",toes_req_file);
  781.       fputs("City/state:^M^J",toes_req_file);
  782.       config_city();
  783.       continue;
  784.     }
  785.     if (char == 85)  // Pressed U
  786.     {
  787.       fputs(char,toes_req_file);
  788.       fputs("^M^J",toes_req_file);
  789.       fputs("Select:^M^J",toes_req_file);
  790.       config_user_list();
  791.       continue;
  792.     }
  793.     if (char == 65)  // Pressed A
  794.     {
  795.       fputs(char,toes_req_file);
  796.       fputs("^M^J",toes_req_file);
  797.       fputs("Press ENTER to continue^M^J",toes_req_file);
  798.       config_language();
  799.       continue;
  800.     }
  801.     if (char == 63)  // Pressed ?
  802.     {
  803.       clear_scr();
  804.       prints("On line help displays are not supported from here.");
  805.       delay(20);
  806.       continue;
  807.     }
  808.   } while (1); // loop forever, or until exit (via Q)
  809. }  // end function config_menu
  810.  
  811. list_users()
  812. // this function emulates the list users facility
  813. {
  814.   clear_scr();
  815.   prints("Press ENTER to list all,");
  816.   prints("or type a partial name to match: ");
  817.   gets(s_80,80);
  818.   fputs(s_80,toes_req_file);
  819.   fputs("^M^J",toes_req_file);
  820.   fputs("Press ENTER to continue^M^J",toes_req_file);
  821.   prints("");
  822.   prints("Allan Marillier .......... Johannesburg ............. Wed Feb 27 10:51:29 1991");
  823.   prints("Allan Wright ............. Johannesburg ............. Mon Feb 25 20:27:45 1991");
  824.   prints("Allan Holman ............. Pretoria ................. Mon Feb 04 15:12:24 1991");
  825.   prints("Allan Levin .............. Jhb, Tvl ................. Tue Jan 29 17:31:45 1991");
  826.   prints("Press ENTER to continue");
  827.   fputs("$ENTER$^M^J",toes_req_file);
  828.   fputs(main_prompt,toes_req_file);
  829.   wait_for_enter();
  830. }  // end function list_users
  831.  
  832. version()
  833. // this function emulates the OPUS version facility
  834. {
  835.   clear_scr();
  836.   prints("The OPUS Computer-Based Conversation System, v1.14");
  837.   prints("Copyright 1986,1989,1990, Wynn Wagner III.");
  838.   prints("All rights reserved.");
  839.   prints("A Presentation of The Not Ready For Mainframe Players; Dallas & Elsewhere.");
  840.   prints("See documentation for license information.");
  841.   prints("");
  842.   prints("Computer: AT-class");
  843.   prints("OS: DOS 3.30");
  844.   prints("");
  845.   prints("FOSSIL: Ray Gwinn's double aught buckshot driver, X00 V1.24");
  846.   prints("");
  847.   prints("Version by Doug Boone, with Bob Davis, Rick Huebner, Tom Kashuba, ");
  848.   prints("Vince Perriello and George Stanislav.");
  849.   // return to re-display main menu
  850. }  // end function version
  851.  
  852. xpress()
  853. // this function emulates the Silver Express opening screen
  854. {
  855.   clear_scr();
  856.   prints("");
  857.   prints("Please wait.......");
  858.   prints("");
  859.   prints("And please do not drop carrier until you are back in OPUS....");
  860.   prints("");
  861.   prints("PLEASE RE-SELECT **ALL** your message areas again. I have been rearranging");
  862.   prints("the message areas, as well as pruning.");
  863.   prints("");
  864.   prints("              Thanks -=-=- Dave Pedler");
  865.   prints("Silver Xpress [Opus110] 2.27F2.08ß (c) copyright 1988-90 Santronics Software");
  866.   prints("");
  867.   prints("");
  868.   prints("* Registered Copy of Silver Xpress * 2.27F2.08ß");
  869.   prints("Last Xpress Mail Usage/Download Date : Feb 27,1991  10:51:18am");
  870.   prints("");
  871.   delay(20);
  872.   xpress_main();
  873. }  // end function xpress
  874.  
  875. config_password()
  876. // this function emulates the change password facility
  877. {
  878.   clear_scr();
  879.   printsc("Current password: ");
  880.   s_80 = "";
  881.   do
  882.   {
  883.     gets(s_80,80);
  884.     prints("^M^J");
  885.   } while (strlen(s_80) == 0);
  886.   fputs(s_80,toes_req_file);
  887.   fputs("^M^J",toes_req_file);
  888.   fputs("New password: ^M^J",toes_req_file);
  889.   printsc("New password: ");
  890.   do
  891.   {
  892.     gets(s_80,80);
  893.     prints("^M^J");
  894.   } while (strlen(s_80) == 0);
  895.   fputs(s_80,toes_req_file);
  896.   fputs("^M^J",toes_req_file);
  897.   fputs("Press ENTER to continue^M^J",toes_req_file);
  898.   printsc("Your password is '");
  899.   printsc(s_80);
  900.   prints("'.");
  901.   // substitute the new password here
  902.   prints("Press ENTER to continue");
  903.   fputs("$ENTER$^M^J",toes_req_file);
  904.   fputs(config_prompt,toes_req_file);
  905.   wait_for_enter();
  906. } // end function config_change
  907.  
  908. config_expert_mode()
  909. // this function emulates the config help level / expert mode etc.
  910. {
  911.   prints("Set Help Levels");
  912.   prints("^M^J^M^J");
  913.   prints("N)OVICE  ...........................full menus");
  914.   prints("R)EGULAR ...........................brief menus");
  915.   prints("E)XPERT  ...........................no menus");
  916.   prints("");
  917.   prints("Help level:");
  918.   do
  919.   {
  920.     char = toupper(inkeyw());
  921.   } while (char != 'N' && char != 'R' && char != 'E');
  922.   if (char == 'R')
  923.     config_prompt = "CHANGE :  [P H N W L T M V S F I C U A Q ?]:^M^J";
  924.   fputs(char,toes_req_file);
  925.   fputs("^M^J",toes_req_file);
  926.   fputs(config_prompt,toes_req_file);
  927. } // end function config_expert_mode
  928.  
  929. config_nulls()
  930. // this function emulates the null setting facility
  931. {
  932.   prints("Nulls (0-200): ");
  933.   valid_number(0,200);
  934.   fputs(s_10,toes_req_file);
  935.   fputs("^M^J",toes_req_file);
  936.   fputs(config_prompt,toes_req_file);
  937. } // end function config_nulls
  938.  
  939. config_width()
  940. // this function emulates the width setting facility
  941. {
  942.   prints("Monitor width (20-132): ");
  943.   valid_number(20,132);
  944.   fputs(s_10,toes_req_file);
  945.   fputs("^M^J",toes_req_file);
  946.   fputs("Is the `X' at the far left on a line? [Y,n]? ^M^J",toes_req_file);
  947.   prints("");
  948.   prints("-------------------------------------------------------------------------------X");
  949.   prints("---------");
  950.   prints("Is the `X' at the far left on a line? [Y,n]? ");
  951.   valid_choice('Y','N','','','');
  952.   fputs(s_10,toes_req_file);
  953.   fputs("^M^J",toes_req_file);
  954.   fputs(config_prompt,toes_req_file);
  955. } // end function config_width
  956.  
  957. config_length()
  958. // this function emulates the change length facility
  959. {
  960.   prints("77");
  961.   prints("78");
  962.   prints("79");
  963.   prints("80");
  964.   prints("81");
  965.   prints("82");
  966.   prints("83");
  967.   prints("84");
  968.   prints("85");
  969.   prints("86");
  970.   prints("87");
  971.   prints("88");
  972.   prints("89");
  973.   prints("90");
  974.   prints("91");
  975.   prints("92");
  976.   prints("93");
  977.   prints("94");
  978.   prints("95");
  979.   prints("96");
  980.   prints("97");
  981.   prints("98");
  982.   prints("What number is on the TOP of your display? ");
  983.   do
  984.   {
  985.     gets(s_10,3);
  986.     number = stoi(s_10);
  987.   }
  988.   while (number <= 0 && number >= 500);
  989.   fputs(s_10,toes_req_file);
  990.   fputs("^M^J",toes_req_file);
  991.   fputs(config_prompt,toes_req_file);
  992. } // end function config_length
  993.  
  994. config_tabs()
  995. // this function emulates the config tabs facility
  996. {
  997.   // echo nothing - simply toggle
  998. } // end functon config_tabs
  999.  
  1000. config_more()
  1001. // this function emulates the config more facility
  1002. {
  1003.   // echo nothing - simply toggle
  1004. } // end functon config_more
  1005.  
  1006. config_video()
  1007. // this function emulates the video type change facility
  1008. {
  1009.   prints("VIDEO");
  1010.   prints("");
  1011.   prints("");
  1012.   prints("P)lain..............................TTY");
  1013.   prints("A)NSI...............................VT100");
  1014.   prints("O)pus...............................AVATAR");
  1015.   prints("Select:");
  1016.   valid_choice('P','A','O','','');
  1017.   fputs(s_10,toes_req_file);
  1018.   fputs("^M^J",toes_req_file);
  1019.   fputs(config_prompt,toes_req_file);
  1020. } // end function config_video
  1021.  
  1022. config_screen_clear()
  1023. // this function emulates the config screen clear facility
  1024. {
  1025.   // echo nothing - simply toggle
  1026. } // end function config_screen_clear
  1027.  
  1028. config_fs_edit()
  1029. // this function emulates the config full screen edit facility
  1030. {
  1031.   prints("`G)raphics' & `S)crn.clr' required. Press ENTER to continue");
  1032.   prints("^M^J^M^J");
  1033.   prints("<TOESREQ : check your log file to see if IBM Graphics and>");
  1034.   prints("<  Screen clear are active or not. Full screen edit will>");
  1035.   prints("<  automatically be toggled if at all possible, otherwise you>");
  1036.   prints("<  will find the above message.>");
  1037.   wait_for_enter();
  1038.   // wait for input. Also check what happens when graphics IS selected
  1039. } // end function config_fs_edit
  1040.  
  1041. config_IBM_graphics()
  1042. // this function emulates the config IBM graphics facility
  1043. {
  1044.   // echo nothing - simply toggle
  1045. } // end function config_IBM_graphics
  1046.  
  1047. config_city()
  1048. // this function emulates the config city facility
  1049. {
  1050.   prints("City/state:");
  1051.   do
  1052.   {
  1053.     gets(s_80,80);
  1054.   }
  1055.   while (strlen(s_80) < 5);
  1056.   fputs(s_80,toes_req_file);
  1057.   fputs("^M^J",toes_req_file);
  1058.   fputs(config_prompt,toes_req_file);
  1059. } // end function config_city
  1060.  
  1061. config_user_list()
  1062. // this function emulates the config user list facility
  1063. {
  1064.   ok = 0;
  1065.   do
  1066.   {
  1067.     prints("");
  1068.     prints("User List");
  1069.     prints("");
  1070.     prints("Listed in User list: YES  List City: YES  Last time on: YES");
  1071.     prints("");
  1072.     prints("I)nclude............................Include me in the list");
  1073.     prints("C)ity...............................List City");
  1074.     prints("T)ime...............................List last time online");
  1075.     prints("Select:");
  1076.     valid_choice('I','C','T',27,13);   // allow Esc
  1077.     if (s_10 == "^^27" || s_10 == "^^13")
  1078.     {
  1079.       ok = 1;
  1080.       fputs("$ENTER$^M^J",toes_req_file);
  1081.       fputs(config_prompt,toes_req_file);
  1082.     }
  1083.     else
  1084.     {
  1085.       clear_scr();
  1086.       fputs(s_10,toes_req_file);
  1087.       fputs("^M^J",toes_req_file);
  1088.       fputs("Select:^M^J",toes_req_file);
  1089.       if (s_10 == "^^73")
  1090.         prints("<TOESREQ : Include will be toggled .....ON/OFF>");
  1091.       else
  1092.         if (s_10 == "^^67")
  1093.           prints("<TOESREQ : City will be toggled .....ON/OFF>");
  1094.         else
  1095.           prints("<TOESREQ : Time will be toggled .....ON/OFF>");
  1096.     }
  1097.   }
  1098.   while (ok == 0);
  1099. } // end function config_user_list
  1100.  
  1101. config_language()
  1102. // this function emulates the config language facility
  1103. {
  1104.   prints("^M^J^M^J");
  1105.   prints("User Language:");
  1106.   prints("");
  1107.   prints("No other language available");
  1108.   prints("Press ENTER to continue");
  1109.   wait_for_enter();
  1110.   fputs("$ENTER$^M^J",toes_req_file);
  1111.   fputs(config_prompt,toes_req_file);
  1112. } // end function config_language
  1113.  
  1114. bulletin_display()
  1115. // this function emulates displaying a bulletin
  1116. {
  1117.   prints("^M^J^M^J");
  1118.   prints("The subscription system");
  1119.   prints("");
  1120.   prints("  Sysop's Address, etc.");
  1121.   prints("As of 1st January 1988, this FIDO BBS is a restricted BBS. Please");
  1122.   prints("Download and read the file 'BULLETIN.4' for more details. This file is foud");
  1123.   prints("in file area 1.");
  1124.   prints("");
  1125.   prints("This is a sample bulletin - an extract taken from a real one.");
  1126.   prints("This is NOT what you will see .... simply an example.");
  1127.   prints("Press ENTER to continue");
  1128.   wait_for_enter();
  1129.   fputs("$ENTER$^M^J",toes_req_file);
  1130.   fputs(main_prompt,toes_req_file);
  1131. } // end function bulletin_display
  1132.  
  1133. message_area()
  1134. // this function emulates the message area change facility
  1135. {
  1136.   area_type = "m";
  1137.   msg_fil_area();
  1138. } // end message_area
  1139.  
  1140. message_list()
  1141. // this function emulates the message area list facility
  1142. {
  1143.   prints("Start with which message# ? 1");
  1144.   number = 0;
  1145.   do
  1146.   {
  1147.     kounter = gets(s_10,3);
  1148.     number = stoi(s_10);
  1149.     if (number == 0)
  1150.     {
  1151.       number = 1;
  1152.       s_10 = "1";
  1153.     }
  1154.     if (number != 0)
  1155.     {
  1156.       fputs(s_10,toes_req_file);
  1157.       fputs("^M^J",toes_req_file);
  1158.       fputs(message_prompt,toes_req_file);
  1159.       break;
  1160.     }
  1161.   } while (number == 0);
  1162.   prints("^M^J^M^J^M^J");
  1163.   prints(s_80);  // this string is made up of the correct area number
  1164.   prints("");
  1165.   prints("#138 18-Feb-91 10:24am     REC'D is from Jose Deavila to Franz Tomasek");
  1166.   prints("#146 10-Feb-91 04:38pm     REC'D is from Russell Wood to Kalle Pihlajasaari");
  1167.   prints("#152 22-Feb-91 10:48am     REC'D is from Ken Ironside to Dave Pedler");
  1168.   prints("#154 24-Feb-91 09:47am     REC'D is from Mark Stayt to Jose Deavila");
  1169.   prints("#156 25-Feb-91 02:53pm           is from Mimi Milstein to Lynn Fletcher");
  1170.   prints("#158 26-Feb-91 03:32pm PVT REC'D is TO you from Mimi Milstein");
  1171.   prints("#161 27-Feb-91 07:44am PVT REC'D is FROM you to Mimi Milstein");
  1172.   prints("^M^J^M^J");
  1173.   delay(20);
  1174. } // end message_list
  1175.  
  1176. message_scan()
  1177. // this function emulates the message area scan facility
  1178. {
  1179.   prints("Scanning messages in ALL areas.  Control-K aborts.");
  1180.   prints("Use `SV' (scan verbose) for more detail.");
  1181.   prints("^M^J^M^J");
  1182.   prints("Area    1 ... Replies to log-off messages and more");
  1183.   prints("");
  1184.   prints("#74  31-Jan-91 07:56am PVT REC'D is TO you from Dave Pedler");
  1185.   prints("#158 26-Feb-91 03:32pm PVT REC'D is TO you from Mimi Milstein");
  1186.   prints("^M^J^M^J");
  1187.   prints("Area    2 ... The Technical conference");
  1188.   prints("");
  1189.   prints("#161 26-Feb-91 03:23pm     REC'D is TO you from Mimi Milstein");
  1190.   prints("#162 26-Feb-91 06:33pm     REC'D is TO you from Kevin Ireland");
  1191.   prints("#164 26-Feb-91 07:18pm     REC'D is TO you from Kevin Ireland");
  1192.   prints("^M^J^M^J");
  1193.   prints("Area    3 ... FidoNet Mail area");
  1194.   prints("^M^J^M^J^M^J");
  1195.   prints("Area    4 ... The general gossip conference");
  1196.   prints("");
  1197.   prints("#112 26-Feb-91 07:24pm     REC'D is TO you from Kevin Ireland");
  1198.   prints("#113 26-Feb-91 06:58pm     REC'D is TO you from Kevin Ireland");
  1199.   prints("#121 25-Feb-91 08:51am     REC'D is TO you from Sean White");
  1200.   prints("^M^J^M^J");
  1201.   prints("Area    5 ... Classifieds - Buy, Sell, and/or Swop");
  1202.   prints("^M^J^M^J^M^J");
  1203.   prints("Press ENTER to continue");
  1204.   wait_for_enter();
  1205.   fputs("$ENTER$^M^J",toes_req_file);
  1206.   fputs(message_prompt,toes_req_file);
  1207. } // end message_scan
  1208.  
  1209. message_inquire()
  1210. // this function emulates the message area inquire facility
  1211. {
  1212.   prints("^M^J^M^J");
  1213.   prints("INQUIRE");
  1214.   prints("");
  1215.   prints("Type `?' by itself for help, or");
  1216.   prints("Type what you want to find: ");
  1217.   gets(s_80,80);
  1218.   prints("");
  1219.   prints("Searching for s_80");
  1220.   prints("#125  TO Sample User");
  1221.   prints("    FROM Another User");
  1222.   fputs(s_80,toes_req_file);
  1223.   fputs("^M^J",toes_req_file);
  1224.   fputs(message_prompt,toes_req_file);
  1225.   inschrs("Subject ",s_80,0,8);
  1226.   prints(s_80);
  1227.   prints("^M^J^M^J");
  1228.   delay(20);
  1229. } // end function message_inquire
  1230.  
  1231. message_area_show()
  1232. // this function displays the message areas
  1233. {
  1234.   prints("The Golden City Opus Areas        <TOESREQ : Abridged>");
  1235.   prints("");
  1236.   prints("      1 ... Replies to log-off messages and more");
  1237.   prints("      2 ... The Technical conference");
  1238.   prints("      3 ... FidoNet Mail area");
  1239.   prints("      4 ... The general gossip conference");
  1240.   prints("      5 ... Classifieds - Buy, Sell, and/or Swop");
  1241.   prints("      .");
  1242.   prints("      .");
  1243.   prints("      .");
  1244.   prints("     116 R/O UseNet Science Aeronautics Conference (Read Only)");
  1245.   prints("     117 R/O UseNet Science Enviroment Conference (Read Only)");
  1246.   prints("     118 R/O UseNet Science Medical Conference (Read Only)");
  1247.   prints("     119 R/O UseNet Pascal Conference (Read Only)");
  1248.   prints("");
  1249.   prints("     Areas marked PWD are passworded!");
  1250.   prints("     Areas marked R/O are read only!");
  1251. } // end function message_area_show
  1252.  
  1253. file_area()
  1254. // this function simulates the file area change facility
  1255. {
  1256.   area_type = "f";
  1257.   msg_fil_area();
  1258. } // end function file_area
  1259.  
  1260. file_area_show()
  1261. // this function displays the available file areas
  1262. {
  1263.   prints("The Golden City Opus Areas");
  1264.   prints("");
  1265.   prints(" 1 ... Ascii and other files");
  1266.   prints(" 2 ... The latest nodelists and nodediffs");
  1267.   prints(" 3 ... FidoNet compatible BBS programs");
  1268.   prints("11 SUB MS-DOS Games Titles N to Z");
  1269.   prints("12 SUB MS-DOS Utility Files (Titles A to M)");
  1270.   prints("13 SUB MS-DOS Utility Files (Titles N to Z)");
  1271.   prints("14 SUB Operating Systems/M'tasking/others");
  1272.   prints("41 ... FidoNet BBS Utilities");
  1273.   prints("42 SUB Utilities for your Hard and Floppy Drives");
  1274.   prints("43 SUB Utilities for your Screen and Monitor");
  1275.   prints("44 ... The BinkleyTerm mailer program");
  1276.   prints("45 SUB Miscellaneous Application Programs");
  1277.   prints("46 SUB The Complete *New* King James Bible");
  1278.   prints("100 PWD The Turbo C Users Group File area");
  1279.   prints("");
  1280.   prints("Areas marked PWD are passworded!");
  1281.   prints("Areas marked SUB only allow subscribers to Download!");
  1282.   prints("^M^J^M^J");
  1283. } // end function file_area_show
  1284.  
  1285. file_locate()
  1286. // this function simulates the file area locate facility
  1287. {
  1288.   ok = 0;
  1289.   do
  1290.   {
  1291.     prints("^M^J^M^J");
  1292.     prints("L)OCATE");
  1293.     prints("");
  1294.     prints("Type `?' by itself for help.");
  1295.     prints("");
  1296.     prints("Locate what file (or description)? ");
  1297.     gets(s_80,80);
  1298.     if (strpos(s_80,"*",0) >= 0 || strpos(s_80,"?",0) >= 0)
  1299.     {
  1300.       prints("");
  1301.       prints("L)OCATE does not use `*' or `?' characters.");
  1302.       prints("Press ENTER to continue");
  1303.       prints("^M^J^M^J");
  1304.       continue; // break out of test and loop back to start
  1305.     }
  1306.     ok = 1;
  1307.     fputs(s_80,toes_req_file);
  1308.     fputs("^M^J",toes_req_file);
  1309.     fputs(file_prompt,toes_req_file);
  1310.     prints("");
  1311.     printsc("Looking for ");
  1312.     prints(s_80);
  1313.     prints("^M^J^M^J");
  1314.     for (kounter = 0; kounter <= 3; kounter = kounter + 1)
  1315.       prints("File xyz .... area xyz");
  1316.     prints("Located ***** matches.");
  1317.     prints("^M^J^M^J");
  1318.     delay(20);
  1319.   } while (ok == 0);
  1320. } // end function file_locate
  1321.  
  1322. file_titles()
  1323. // this function emulates the file titles display facility
  1324. {
  1325.   prints("-General files for you to T)ype or download");
  1326.   prints(" ==========================================");
  1327.   prints("OPUSER.ZIP     34265 04-05-89* [385] The users manual for OPU.");
  1328.   prints("OPUSER.TXT    104749 09-23-86* [106] The users manual in ascii forma.");
  1329.   prints("OPEDHELP.TXT    3504 12-22-88* [297] Opus Full scrn mess editor help fil.");
  1330.   prints("                               DOWNLOAD!");
  1331.   prints("FIDONET.TXT     9216 08-16-87* [286] Some explanations about FIDONT");
  1332.   prints("EDTORIAL.TXT    3655 12-29-87* [166] The explanations why FIDO is nowa");
  1333.   prints("                               subscription BBS");
  1334.   prints("BULLETIN.4      1665 12-24-90* [ 36] An membership application form for this");
  1335.   prints("                               BBS");
  1336.   prints("TC.DOC          6144 05-07-89* [287] How to join the Turbo C user group here");
  1337.   prints("F491-001.NEW   12575 02-26-91* [ 83] new files on this system");
  1338.   delay(20);
  1339. } // end function file_titles
  1340.  
  1341. file_type()
  1342. // this function emulates the type a file function
  1343. {
  1344.   prints("Display what file?");
  1345.   gets(s_80,80);
  1346.   prints("");
  1347.   fputs(s_80,toes_req_file);
  1348.   fputs("^M^J",toes_req_file);
  1349.   fputs(file_prompt,toes_req_file);
  1350.   prints("");
  1351.   prints("** New files from the 30 day period 01-27-91 15:51:40 - 02-26-91 15:51:40 **");
  1352.   prints("^M^J^M^J");
  1353.   prints("╓────────────────╥────────────────────────────────────────────────────────────╖");
  1354.   prints("║ File Area #1   ║ Ascii and other files                                      ║");
  1355.   prints("╙────────────────╨────────────────────────────────────────────────────────────╜");
  1356.   prints("                       (Matrix filerequest possible)");
  1357.   prints("");
  1358.   prints("F491-001.TXT       0 02-26-91* [190] Files on this BS");
  1359.   prints("F491-001.LZH  124955 02-26-91* [ 66] Arc'ed version of above file");
  1360.   prints("GCBBSDB.TXT   150016 02-26-91* [ 40] comma delimited file of above for dBaseII");
  1361.   prints("                               import");
  1362.   prints("F491-001.NEW       0 02-26-91* [ 80] new files on this system");
  1363.   prints("BBSMRT91.ZIP    2303 02-06-91* [ 20] Latest BBS listning (South-Africa)");
  1364.   prints("BBSFEB91.ZIP    3403 02-09-91* [ 15] BBS numbers in R.S.A for February 1991");
  1365.   prints("^M^J^M^J");
  1366.   prints("  ╔══════════════════════════════════════════════════════════════════════════╗");
  1367.   prints("  ║ This list was created using X_List V.2.12,  (C) DUGFRISK & BIFROST UnLtd ║");
  1368.   prints("  ║       (C) Kristian Ottosen 1987 - 1990, (C) Per Holm 1989 - 1990.        ║");
  1369.   prints("  ║    Look out for quality software from Danish Opus Crew and Denmark on    ║");
  1370.   prints("  ║              Asgaard BBS - FidoNet 2:230/22  +45-86-119043               ║");
  1371.   prints("  ╚══════════════════════════════════════════════════════════════════════════╝");
  1372.   delay(20);
  1373. } // end function file_type
  1374.  
  1375. file_upload()
  1376. // this function emulates the file upload facility
  1377. {
  1378.   s_80 = 255;
  1379.   get_protocol();
  1380.   fputs(char,toes_req_file);
  1381.   fputs("^M^J",toes_req_file);
  1382.   if (protocol == 'Q')
  1383.     fputs(file_prompt,toes_req_file);
  1384.   else
  1385.   {
  1386.     // wait for upload - ie. send file from script
  1387.     char = vsavearea(5,5,75,10);
  1388.     if (char != -1)
  1389.     {
  1390.       box(5,5,75,12,2,0,112);
  1391.       scroll(6,6,74,11);
  1392.       gotoxy(7,7);
  1393.       printsc("OPUS does not at this point ask you for the file name to upload");
  1394.       gotoxy(7,8);
  1395.       printsc(" however, the script needs to know it in order to generate the");
  1396.       gotoxy(7,9);
  1397.       printsc(" correct file request. Please enter it below, with the FULL path.");
  1398.       gotoxy(7,10);
  1399.       printsc("_");
  1400.       gotoxy(7,10);
  1401.       gets(s_80,80);
  1402.       prints("");
  1403.       vrstrarea(char);
  1404.     }
  1405.     prints("Ready to receive        Zmodem");
  1406.     prints("Begin sending now or send CONTROL-X twice to cancel.");
  1407.     fputs("Begin sending now or send CONTROL-X twice to cancel.^M^J",toes_req_file);
  1408.     send(protocol,s_80);
  1409.     // NOTE : Within the TOES script, which will be acting on the instructions
  1410.     // created by this script, in TOES.REQ - I must test for a file transfer
  1411.     // request, and act accordingly.
  1412.     fputs("$FILE_SEND$ ",toes_req_file); // dummy - to make the TOES script
  1413.                                        // perform a file receive
  1414.     fputs(protocol,toes_req_file);
  1415.     fputs(" ",toes_req_file);
  1416.     fputs(s_80,toes_req_file);
  1417.     fputs("^M^J",toes_req_file);
  1418.     prints("");
  1419.     prints("Transfer complete");
  1420.     prints("^M^J^M^J^M^J");
  1421.     prints("Thanks for the upload, Allan Marillier.");
  1422.     prints("");
  1423.     printsc("Please describe ");
  1424.     printsc(s_80);
  1425.     prints(":");
  1426.     gets(s_80,80);
  1427.     fputs("Please describe ^M^J",toes_req_file);
  1428.     fputs(s_80,toes_req_file);
  1429.     fputs("^M^J",toes_req_file);
  1430.     fputs(file_prompt,toes_req_file);
  1431.   }
  1432. } // end function file_upload
  1433.  
  1434. file_download()
  1435. // this function emulates the file download facility
  1436. {
  1437.   s_80 = 255;
  1438.   get_protocol();
  1439.   fputs(char,toes_req_file);
  1440.   fputs("^M^J",toes_req_file);
  1441.   if (protocol == 'Q')
  1442.     fputs(file_prompt,toes_req_file);
  1443.   else
  1444.   {
  1445.     fputs("What do you want to receive?^M^J",toes_req_file);
  1446.     prints("What do you want to receive?");
  1447.     gets(s_80,80);
  1448.     prints("");
  1449.     if (s_80 == "")
  1450.     {
  1451.       fputs("^M^J",toes_req_file);
  1452.       fputs(file_prompt,toes_req_file);
  1453.     }
  1454.     else
  1455.     {
  1456.       fputs(s_80,toes_req_file);
  1457.       fputs("^M^J",toes_req_file);
  1458.       fputs("Begin receiving now or send several CONTROL-X's to cancel.^M^J",toes_req_file);
  1459.       prints("File:  Biosinfo.zip");
  1460.       prints("Size:  4017 bytes (32 x-blks)");
  1461.       prints("Time:  zmodem=0:04 xmodem/telink=0:05 sealink=0:04");
  1462.       prints("");
  1463.       prints("Mode:  Zmodem");
  1464.       prints("");
  1465.       prints("Begin receiving now or send several CONTROL-X's to cancel.");
  1466.       prints("^M^J^M^J");
  1467.       receive(protocol,s_80);
  1468.       // NOTE : Within the TOES script, which will be acting on the instructions
  1469.       // created by this script, in TOES.REQ - I must test for a file transfer
  1470.       // request, and act accordingly.
  1471.       fputs("$FILE_RECEIVE$ ",toes_req_file); // dummy - to make the TOES script
  1472.                                          // perform a file receive
  1473.       fputs(protocol,toes_req_file);
  1474.       fputs(" ",toes_req_file);
  1475.       fputs(s_80,toes_req_file);
  1476.       fputs("^M^J",toes_req_file);
  1477.       fputs(file_prompt,toes_req_file);
  1478.     }
  1479.   }
  1480. } // end function file_download
  1481.  
  1482. file_statistics()
  1483. // this function emulates the file statistics facility
  1484. {
  1485.   prints("^M^J^M^J^M^J");
  1486.   prints("Your statistics for Wed Feb 27 14:28:35 1991");
  1487.   prints("");
  1488.   prints("TIME");
  1489.   prints(" Time on line, this call.................         11 minutes");
  1490.   prints(" Time remaining for this call............         61 minutes");
  1491.   prints(" Time of previous calls today............         23 minutes");
  1492.   prints(" Calls to date...........................        552");
  1493.   prints("FILES");
  1494.   prints(" UL (from you)...........................       4253 k-bytes");
  1495.   prints(" DL (to you).............................      22333 k-bytes");
  1496.   prints(" Download available......................        600 k-bytes");
  1497.   prints("<*>");
  1498.   prints("Listed in User list: YES  List City: YES  Last time on: YES");
  1499.   prints("Current Language:  ENGLISH");
  1500.   prints("^M^J^M^J");
  1501.   delay(20);
  1502. } // end function file_statistics
  1503.  
  1504. file_raw()
  1505. // this function emulates the file raw list facility
  1506. {
  1507.   prints("File name mask:");
  1508.   // wait for input. If just enter, list all.
  1509.   gets(s_80,80);
  1510.   prints("");
  1511.   if (s_80 == "ä")
  1512.     s_80 = "*.*";
  1513.   fputs(s_80,toes_req_file);
  1514.   fputs("^M^J",toes_req_file);
  1515.   fputs(file_prompt,toes_req_file);
  1516.   prints("8BITSPEC.ZIP    2335    January 7, 1989       08:22");
  1517.   prints("EXEC-PC.LZH     9600    January 1, 1991       11:28");
  1518.   prints("BIOSINFO.ZIP    4017    December 25, 1988     04:17");
  1519.   prints("BULLETIN.4      1665    December 24, 1990     02:30");
  1520.   prints("DIR.BBS           23    April 17, 1990        00:22");
  1521.   prints("DRCOMPAT.ZIP    2234    December 25, 1988     04:26");
  1522.   prints("EDTORIAL.TXT    3655    December 29, 1987     10:24");
  1523.   prints("F491-001.LZH  125294    February 26, 1991     02:54");
  1524.   delay(20);
  1525. } // end function file_raw
  1526.  
  1527. file_contents()
  1528. // this function emulates the file display contents facility
  1529. {
  1530.   prints("^M^J^M^J");
  1531.   prints("CONTENTS");
  1532.   prints("");
  1533.   prints("Type `?' by itself for help,");
  1534.   prints("Type the name of an archive: ");
  1535.   gets(s_80,80);
  1536.   fputs(s_80,toes_req_file);
  1537.   fputs("^M^J",toes_req_file);
  1538.   fputs("More [Y,n]?^M^J",toes_req_file);
  1539.   prints("");
  1540.   prints("");
  1541.   prints("Contents of: ANTI-ZAP.ZIP");
  1542.   prints("File name    SIZE: now    full   DATE");
  1543.   prints("");
  1544.   prints("README.1ST         623    1029  01-Oct-90 12:50am");
  1545.   prints("ZAPDOCS.DOC       5616   13418  01-Oct-90 12:37am");
  1546.   prints("ZAP121.PCB        1141   12899  30-Sep-90 02:27pm");
  1547.   prints("ZAP221.PCB        2305   48137  30-Sep-90 02:20pm");
  1548.   prints("ZAPCOMP.PCB       3830   48137  30-Sep-90 03:13pm");
  1549.   prints("ZAPDIAG.PCB       4669  121567  30-Sep-90 11:53pm");
  1550.   prints("");
  1551.   prints("      6 files    18184  245187");
  1552.   prints("");
  1553.   prints("More [Y,n]?");
  1554.   valid_choice('Y','N','','','');
  1555.   fputs(s_10,toes_req_file);
  1556.   fputs("^M^J",toes_req_file);
  1557.   fputs(file_prompt,toes_req_file);
  1558. } // end function file_contents
  1559.  
  1560. xpress_main()
  1561. // this function emulates the Silver Express main menu
  1562. {
  1563.   do
  1564.   {
  1565.     prints("");
  1566.     prints("*--------------------------------*");
  1567.     prints("   Xpress V2.27F2.08ß Main Menu");
  1568.     prints("*--------------------------------*");
  1569.     prints("[77 mins] Allan, Enter C, D, U, S, H, Q ?");
  1570.     char = 0;
  1571.     char = toupper(inkeyw());
  1572.     if (char == 81)  // Pressed Q
  1573.     {
  1574.       fputs(char,toes_req_file);
  1575.       fputs("^M^J",toes_req_file);
  1576.       fputs(main_prompt,toes_req_file);
  1577.       break;
  1578.     }
  1579.     if (char == 67)  // Pressed C
  1580.     {
  1581.       fputs(char,toes_req_file);
  1582.       fputs("^M^J",toes_req_file);
  1583.       fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file);
  1584.       // NOTE - this assumes expert mode on the BBS side of SX
  1585.       xpress_config();
  1586.       continue;
  1587.     }
  1588.     if (char == 68)  // Pressed D
  1589.     {
  1590.       clear_scr();
  1591.       prints("Silver Express on line Downloads not supported. These will be ");
  1592.       prints("  handled by the script, TOES.");
  1593.       delay(10);
  1594.       continue;
  1595.     }
  1596.     if (char == 85)  // Pressed U
  1597.     {
  1598.       clear_scr();
  1599.       prints("Silver Express on line Uploads not supported. These will be ");
  1600.       prints("  handled by the script, TOES.");
  1601.       delay(10);
  1602.       continue;
  1603.     }
  1604.     if (char == 83)  // Pressed S
  1605.     {
  1606.       fputs(char,toes_req_file);
  1607.       fputs("^M^J",toes_req_file);
  1608.       fputs("View Log: <L>ist, <S>earch, <T>oday Usage, <K>ill <CR>-Exit  :^M^J",toes_req_file);
  1609.       xpress_statistics();
  1610.       continue;
  1611.     }
  1612.     if (char == 72 || char == 63)  // Pressed H or ?
  1613.     {
  1614.       clear_scr();
  1615.       prints("Silver Express on line help not supported. For online help, ");
  1616.       prints("  connect online and read it or download the relevant doc files.");
  1617.       delay(10);
  1618.       continue;
  1619.     }
  1620.   }
  1621.   while (1); // loop forever, or until exit via Q
  1622. } // end function xpress_main
  1623.  
  1624. xpress_config()
  1625. // this function emulates the Silver Express config menu
  1626. {
  1627.   do
  1628.   {
  1629.     prints("*----------------------*");
  1630.     prints("   Configuration Menu");
  1631.     prints("*----------------------*");
  1632.     prints("[77 mins] Allan, Enter S, K, T, A, G, M, X, L, Y, H, Q ? ");
  1633.     char = 0;
  1634.     char = toupper(inkeyw());
  1635.     if (char == 81)  // Pressed Q
  1636.     {
  1637.       fputs(char,toes_req_file);
  1638.       fputs("^M^J",toes_req_file);
  1639.       fputs(xpress_prompt,toes_req_file);
  1640.       break;
  1641.     }
  1642.     if (char == 83)  // Pressed S
  1643.     {
  1644.       fputs(char,toes_req_file);
  1645.       fputs("^M^J",toes_req_file);
  1646.       fputs("Enter Area Number(s) :^M^J",toes_req_file);
  1647.       xpress_config_select();
  1648.       continue;
  1649.     }
  1650.     if (char == 75)  // Pressed K
  1651.     {
  1652.       fputs(char,toes_req_file);
  1653.       fputs("^M^J",toes_req_file);
  1654.       fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, <CR>-Menu ]^M^J",toes_req_file);
  1655.       xpress_config_keywords();
  1656.       continue;
  1657.     }
  1658.     if (char == 84)  // Pressed T
  1659.     {
  1660.       fputs(char,toes_req_file);
  1661.       fputs("^M^J",toes_req_file);
  1662.       fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file);
  1663.       xpress_config_transfer();
  1664.       continue;
  1665.     }
  1666.     if (char == 65)  // Pressed A
  1667.     {
  1668.       fputs(char,toes_req_file);
  1669.       fputs("^M^J",toes_req_file);
  1670.       fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file);
  1671.       xpress_config_archive();
  1672.       continue;
  1673.     }
  1674.     if (char == 71)  // Pressed G
  1675.     {
  1676.       fputs(char,toes_req_file);
  1677.       fputs("^M^J",toes_req_file);
  1678.       fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file);
  1679.       xpress_config_graphics();
  1680.       continue;
  1681.     }
  1682.     if (char == 77)  // Pressed M
  1683.     {
  1684.       fputs(char,toes_req_file);
  1685.       fputs("^M^J",toes_req_file);
  1686.       fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file);
  1687.       xpress_config_menu_hotkey();
  1688.       continue;
  1689.     }
  1690.     if (char == 88)  // Pressed X
  1691.     {
  1692.       fputs(char,toes_req_file);
  1693.       fputs("^M^J",toes_req_file);
  1694.       fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file);
  1695.       xpress_config_expert();
  1696.       continue;
  1697.     }
  1698.     if (char == 76)  // Pressed L
  1699.     {
  1700.       fputs(char,toes_req_file);
  1701.       fputs("^M^J",toes_req_file);
  1702.       fputs("Enter Date (format MM-DD-YY) <CR>-today's date       :^M^J",toes_req_file);
  1703.       xpress_config_last();
  1704.       continue;
  1705.     }
  1706.     if (char == 89)  // Pressed Y
  1707.     {
  1708.       fputs(char,toes_req_file);
  1709.       fputs("^M^J",toes_req_file);
  1710.       fputs("[71 mins] Allan, Enter Selection:^M^J",toes_req_file);
  1711.       xpress_config_your();
  1712.       continue;
  1713.     }
  1714.     if (char == 72 || char == 63)  // Pressed H or ?
  1715.     {
  1716.       clear_scr();
  1717.       prints("Silver Express Configs on line help not supported. For online help, ");
  1718.       prints("  connect online and read it or download the relevant doc files.");
  1719.       delay(10);
  1720.       continue;
  1721.     }
  1722.   }
  1723.   while (1); // loop forever, or until exit via Q
  1724. } // end function xpress_config
  1725.  
  1726. xpress_statistics()
  1727. // this function emulates the silver express statistics facility
  1728. {
  1729.   clear_scr();
  1730.   do
  1731.   {
  1732.     char = 0;
  1733.     do
  1734.     {
  1735.       prints("View Log: <L>ist, <S>earch, <T>oday Usage, <K>ill <CR>-Exit  :");
  1736.       char = toupper(inkeyw());
  1737.     }
  1738.     while (char != 'L' && char != 'S' && char != 'T' && char != 'K' && char != 13);
  1739.     if (char == 13)
  1740.     {
  1741.       fputs("$ENTER$^M^J",toes_req_file);
  1742.       fputs(xpress_prompt,toes_req_file);
  1743.       break; // quick exit after pressing Enter
  1744.     }
  1745.     if (char == 'L')
  1746.     {
  1747.       fputs(char,toes_req_file);
  1748.       fputs("^M^J",toes_req_file);
  1749.       fputs("View Log: <L>ist, <S>earch, <T>oday Usage, <K>ill <CR>-Exit  :^M^J",toes_req_file);
  1750.       prints("18 Feb 06:53:44 USER BEGIN ALLAN MARILLIER @ 9600");
  1751.       prints("18 Feb 06:54:02 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80  0:38am 1239");
  1752.       prints("18 Feb 06:54:26 USER  Area   1 (Local to This BBS ) -    7 A");
  1753.       prints("18 Feb 06:54:26 USER  Area   2 (    Technical     ) -   67 A");
  1754.       prints("18 Feb 06:54:26 USER  Area   3 (     FidoNet      ) -    1 A");
  1755.       prints("18 Feb 06:54:26 USER  Area   4 (      Gossip      ) -   42 A");
  1756.       prints("18 Feb 06:54:26 USER  Area 210 (  SE Users Local  ) -    3 A");
  1757.       prints("18 Feb 06:54:26 USER  Area 211 (SE Users Internat ) -   36 A");
  1758.       prints("18 Feb 06:56:54 USER DNLD GCOBBS.OPX w/ Z-Modem 02/18/91  6:55am 90222");
  1759.       prints("18 Feb 06:56:58 USER EXIT   ********************************************");
  1760.       prints("18 Feb 08:57:28 USER BEGIN ALLAN MARILLIER @ 9600");
  1761.       prints("18 Feb 08:58:02 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80  2:51am 5759");
  1762.       prints("18 Feb 08:58:04 USER Area # 3 Msg # 38     To: Victor Wilson PVT 491/1 $0.00");
  1763.       prints("18 Feb 08:58:04 USER Subject: Re: CorelDraw");
  1764.       prints("18 Feb 08:58:06 USER Area # 210 Msg # 21     To: Jean Mooy");
  1765.       prints("18 Feb 08:58:06 USER Subject: Re: New SX script");
  1766.       prints("18 Feb 08:58:12 USER Area # 2 Msg # 214    To: Mimi Milstein");
  1767.       prints("18 Feb 08:58:12 USER Subject: Re: Reassigning function keys");
  1768.       prints("18 Feb 09:04:02 USER DNLD GCOBBS.OPX w/ Z-Modem 02/18/91  9:01am 91665");
  1769.       prints("18 Feb 09:04:48 USER EXIT   ********************************************");
  1770.  
  1771.       prints("19 Feb 07:04:18 USER BEGIN ALLAN MARILLIER @ 9600");
  1772.       prints("19 Feb 07:04:40 USER  Area   1 (Local to This BBS ) -    1 A");
  1773.       prints("19 Feb 07:04:40 USER  Area   2 (    Technical     ) -   53 A");
  1774.       prints("19 Feb 07:04:42 USER  Area   4 (      Gossip      ) -   31 A");
  1775.       prints("19 Feb 07:04:42 USER  Area 211 (SE Users Internat ) -   35 A");
  1776.       prints("19 Feb 07:07:42 USER BEGIN ALLAN MARILLIER @ 9600");
  1777.       prints("19 Feb 07:08:04 USER  Area   1 (Local to This BBS ) -    1 A");
  1778.       prints("19 Feb 07:08:04 USER  Area   2 (    Technical     ) -   53 A");
  1779.       prints("19 Feb 07:08:04 USER  Area   4 (      Gossip      ) -   31 A");
  1780.       prints("19 Feb 07:08:06 USER  Area 211 (SE Users Internat ) -   35 A");
  1781.       prints("19 Feb 07:10:22 USER DNLD GCOBBS.OPX w/ Z-Modem 02/19/91  7:08am 84528");
  1782.       prints("19 Feb 07:10:26 USER EXIT   ********************************************");
  1783.       prints("19 Feb 11:36:50 USER BEGIN ALLAN MARILLIER @ 9600");
  1784.       prints("19 Feb 11:37:38 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80  6:04am 12434");
  1785.       prints("19 Feb 11:37:40 USER Area # 2 Msg # 221    To: Steve Hayes");
  1786.       prints("19 Feb 11:37:40 USER Subject: Re: c.itoh Manual");
  1787.       prints("19 Feb 11:37:42 USER Area # 2 Msg # 222    To: Oliver Steudler");
  1788.       prints("19 Feb 11:37:42 USER Subject: Re: Controller Standards");
  1789.       continue;
  1790.     } // end if pressed L
  1791.  
  1792.     if (char == 'S')
  1793.     {
  1794.       fputs(char,toes_req_file);
  1795.       fputs("^M^J",toes_req_file);
  1796.       fputs("Enter Search String :^M^J",toes_req_file);
  1797.       prints("Enter Search String : ");
  1798.       gets(s_80,80);
  1799.       prints("");
  1800.       fputs(s_80,toes_req_file);
  1801.       fputs("^M^J",toes_req_file);
  1802.       fputs("View Log: <L>ist, <S>earch, <T>oday Usage, <K>ill <CR>-Exit  :^M^J",toes_req_file);
  1803.       prints("Searching....");
  1804.       prints("19 Feb 11:37:40 USER Area # 2 Msg # 221    To: Steve Hayes");
  1805.       prints("19 Feb 11:37:40 USER Subject: Re: c.itoh Manual");
  1806.       prints("19 Feb 11:37:42 USER Area # 2 Msg # 222    To: Oliver Steudler");
  1807.       prints("19 Feb 11:37:42 USER Subject: Re: Controller Standards");
  1808.       continue;
  1809.     }  // end if pressed S
  1810.  
  1811.     if (char == 'T')
  1812.     {
  1813.       fputs(char,toes_req_file);
  1814.       fputs("^M^J",toes_req_file);
  1815.       fputs("View Log: <L>ist, <S>earch, <T>oday Usage, <K>ill <CR>-Exit  :^M^J",toes_req_file);
  1816.       prints("Searching....");
  1817.       prints("27 Feb 06:52:24 USER BEGIN ALLAN MARILLIER @ 9600");
  1818.       prints("27 Feb 06:52:48 USER  Area   1 (Local to This BBS ) -    1 A");
  1819.       prints("27 Feb 06:52:48 USER  Area   2 (    Technical     ) -   12 A");
  1820.       prints("27 Feb 06:52:48 USER  Area   4 (      Gossip      ) -   13 A");
  1821.       prints("27 Feb 06:52:48 USER  Area   8 ( Talk about Comms ) -    5 A");
  1822.       prints("27 Feb 06:52:48 USER  Area  11 (Pascal Conference ) -    1 A");
  1823.       prints("27 Feb 06:52:48 USER  Area  41 ( LANS (Worldwide)   -   27 A");
  1824.       prints("27 Feb 06:52:48 USER  Area 210 (  SE Users Local  ) -    3 A");
  1825.       prints("27 Feb 06:52:48 USER  Area 211 (SE Users Internat ) -   20 A");
  1826.       prints("27 Feb 06:54:42 USER DNLD GCOBBS.OPX w/ Z-Modem 02/27/91  6:53am 35747");
  1827.       prints("27 Feb 06:54:46 USER EXIT   ********************************************");
  1828.       prints("27 Feb 07:01:36 USER BEGIN ALLAN MARILLIER @ 9600");
  1829.       prints("27 Feb 07:01:48 USER EXIT   ********************************************");
  1830.       prints("27 Feb 10:49:26 USER BEGIN ALLAN MARILLIER @ 9600");
  1831.       prints("27 Feb 10:50:18 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80  6:07am 12513");
  1832.       prints("27 Feb 10:50:18 USER Area # 1 Msg # 161    To: Mimi Milstein PVT");
  1833.       prints("27 Feb 10:50:18 USER Subject: Re: Expanded memory card");
  1834.       prints("27 Feb 10:50:20 USER Area # 210 Msg # 28     To: Hennie Strydom");
  1835.       prints("27 Feb 10:50:20 USER Subject: Re: SX MESSAGE READ POINTERS");
  1836.       prints("27 Feb 10:50:20 USER Area # 210 Msg # 29     To: Mimi Milstein");
  1837.       prints("27 Feb 10:50:20 USER Subject: Re: TSF11xAM Script");
  1838.       prints("27 Feb 10:51:14 USER DNLD GCOBBS.OPX w/ Z-Modem 02/27/91 10:50am 6309");
  1839.       prints("27 Feb 10:51:20 USER EXIT   ********************************************");
  1840.       prints("27 Feb 14:03:52 USER BEGIN ALLAN MARILLIER @ 9600");
  1841.       prints("27 Feb 14:03:56 USER EXIT   ********************************************");
  1842.       prints("27 Feb 14:10:56 USER BEGIN ALLAN MARILLIER @ 9600");
  1843.       prints("27 Feb 14:12:08 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80  1:24am 2844");
  1844.       prints("27 Feb 14:12:10 USER Area # 38 Msg # 36     To: Rowan Hutchinson");
  1845.       prints("27 Feb 14:12:10 USER Subject: Re: Menu systems");
  1846.       prints("27 Feb 14:12:12 USER Area # 2 Msg # 176    To: All");
  1847.       prints("27 Feb 14:12:12 USER Subject: Funny PC");
  1848.     } // end if pressed T
  1849.  
  1850.     if (char == 'K')
  1851.     {
  1852.       fputs(char,toes_req_file);
  1853.       fputs("^M^J",toes_req_file);
  1854.       fputs("Kill Log file?^M^J",toes_req_file);
  1855.       prints("");
  1856.       prints("Kill Log file?");
  1857.       valid_choice('Y','N','','','');
  1858.       fputs(s_10,toes_req_file);
  1859.       fputs("^M^J",toes_req_file);
  1860.       fputs("View Log: <L>ist, <S>earch, <T>oday Usage, <K>ill <CR>-Exit  :^M^J",toes_req_file);
  1861.       // wait here for input
  1862.     } // end if pressed K
  1863.   }
  1864.   while (1); // loop forever, or until Enter is pressed to abort
  1865. } // end function xpress_statistics
  1866.  
  1867. xpress_upload()
  1868. // this function indicates non support of xpress upload
  1869. {
  1870.   clear_scr();
  1871.   prints("Silver Express on line upload not supported. This is already ");
  1872.   prints("  catered for by the script TOES.");
  1873. } // end function xpress_upload
  1874.  
  1875. xpress_download()
  1876. // this function indicates non support of xpress download
  1877. {
  1878.   clear_scr();
  1879.   prints("Silver Express on line download not supported. This is already ");
  1880.   prints("  catered for by the script TOES.");
  1881. } // end function xpress_download
  1882.  
  1883. xpress_config_select()
  1884. // this function emulates the silver express config message select facility
  1885. {
  1886.   clear_scr();
  1887.   xpress_c_s_l();    // call xpress_c_s_l to display areas
  1888.   do
  1889.   {
  1890.     prints("[L]ist Areas      [D]etail Listing          [S]elected Areas");
  1891.     prints("[F]ind <string>   [C]hange <area> Pointer   [Q]uit or <CR>");
  1892.     printsc("Enter Area Number(s) : ");
  1893.     // have to read this as a string, then act on it
  1894.     // eg. f addict
  1895.     // or 1 +3 -5
  1896.     gets(buffer,80);
  1897.     prints("");
  1898.     strupper(buffer);
  1899.     if (strlen(buffer) == 0)
  1900.       buffer = "Q";
  1901.     if (strlen(buffer) == 1 && buffer == "Q")   // Q has same effect as Enter
  1902.     {
  1903.       fputs("Q^M^J",toes_req_file);
  1904.       fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file);
  1905.       break; // quick exit after pressing Enter
  1906.     }
  1907.     else
  1908.     if (strlen(buffer) == 1 && (buffer == "L" || buffer == "F"))
  1909.     {
  1910.       // if press l - call xpress_c_s_l to list areas
  1911.       fputs(buffer,toes_req_file);
  1912.       fputs("^M^J",toes_req_file);
  1913.       fputs("Enter Area Number(s) :^M^J",toes_req_file);
  1914.       xpress_c_s_l();
  1915.       continue;
  1916.     }
  1917.     else
  1918.     if (strlen(buffer) == 1 && buffer == "D")
  1919.     {
  1920.       // if press d - call xpress_c_s_d to give detailed area list
  1921.       fputs(buffer,toes_req_file);
  1922.       fputs("^M^J",toes_req_file);
  1923.       fputs("Enter Area Number(s) :^M^J",toes_req_file);
  1924.       xpress_c_s_d();
  1925.       continue;
  1926.     }
  1927.     else
  1928.     if (strlen(buffer) == 1 && buffer == "S")
  1929.     {
  1930.       // if press s - call xpress_c_s_s to give selected area list
  1931.       fputs(buffer,toes_req_file);
  1932.       fputs("^M^J",toes_req_file);
  1933.       fputs("Enter Area Number(s) :^M^J",toes_req_file);
  1934.       xpress_c_s_s();
  1935.       continue;
  1936.     }
  1937.     else
  1938.     if (strlen(buffer) == 1 && buffer == "C")
  1939.     {
  1940.       // if press s - call xpress_c_s_s to give selected area list
  1941.       prints("Enter Areas. ie., 1 3 4 5");
  1942.       fputs(buffer,toes_req_file);
  1943.       fputs("^M^J",toes_req_file);
  1944.       fputs("Enter Area Number(s) :^M^J",toes_req_file);
  1945.       continue;
  1946.     }
  1947.     else
  1948.     if (strpos(buffer,"F ",0) == 0 && strlen(buffer) >= 3)
  1949.     {
  1950.       // if press s - call xpress_c_s_f to give find area facility
  1951.       fputs(buffer,toes_req_file);
  1952.       fputs("^M^J",toes_req_file);
  1953.       fputs("Enter Area Number(s) :^M^J",toes_req_file);
  1954.       xpress_c_s_f();
  1955.       continue;
  1956.     }
  1957.     else
  1958.     if (strpos(buffer,"C ",0) == 0 && strlen(buffer) >= 3)
  1959.     {
  1960.       // if press s - call xpress_c_s_c to give area message number change
  1961.       fputs(buffer,toes_req_file);
  1962.       fputs("^M^J",toes_req_file);
  1963.       fputs("Enter Last Read Msg #. <CR> Keep^M^J",toes_req_file);
  1964.       xpress_c_s_c();
  1965.       continue;
  1966.     }
  1967.     else
  1968.     // some other input, treat it as area changes - possibly test for validity
  1969.     {
  1970.       prints("<TOESREQ - WARNING : what you have entered is assumed to be  >");
  1971.       prints("< a request to SE to modify area pointers. This must take the>");
  1972.       prints("< form shown below :                                         >");
  1973.       prints("<    1 +5 -10                                                >");
  1974.       prints("< which tells SE                                             >");
  1975.       prints("<    toggle area 1, force area 5 ON, and force area 10 OFF   >");
  1976.       prints("");
  1977.       prints("< Please re-enter to confirm that you understand ....        >");
  1978.       prints("< Press Enter with no input to cancel ....                   >");
  1979.       gets(buffer,80);
  1980.       if (strlen(buffer) > 2)
  1981.       {
  1982.         fputs(buffer,toes_req_file);
  1983.         fputs("^M^J",toes_req_file);
  1984.         fputs("Enter Area Number(s) :^M^J",toes_req_file);
  1985.       }
  1986.       continue;
  1987.     }
  1988.   }
  1989.   while (1); // loop forever, or until Enter is pressed to abort
  1990. } // end function xpress_config_select
  1991.  
  1992. xpress_c_s_l()
  1993. // this function emulates the sx function to list all areas
  1994. {
  1995.   prints("*----------------------------------*");
  1996.   prints("       Available Message Areas");
  1997.   prints("*----------------------------------*");
  1998.   prints("");
  1999.   prints(" * (  1) --- (Local to This BBS )      * (  2) --- (    Technical     )");
  2000.   prints(" * (  3) --- (     FidoNet      )      * (  4) --- (      Gossip      )");
  2001.   prints(" * (  5) --- (   Classifieds    )        (  6) --- (      Jokes       )");
  2002.   prints(" * (  7) --- (   Find a File    )      * (  8) --- ( Talk about Comms )");
  2003.   prints(" * (  9) --- (   C Conference   )        ( 10) --- ( Science Fiction  )");
  2004.   prints(" * ( 11) --- (Pascal Conference )        ( 12) --- (      Games       )");
  2005.   prints("^M^J^M^J");
  2006. } // end function xpress_c_s_l
  2007.  
  2008. xpress_c_s_d()
  2009. // this function emulates sx's detailed area list
  2010. {
  2011.   prints("");
  2012.   prints("*----------------------------------*");
  2013.   prints("       Available Message Areas");
  2014.   prints("*----------------------------------*");
  2015.   prints("");
  2016.   prints(" * (  1) --- (Local to This BBS ) Replies to log-off messages and more");
  2017.   prints(" * (  2) --- (    Technical     ) The Technical conference");
  2018.   prints(" * (  3) --- (     FidoNet      ) FidoNet Mail area");
  2019.   prints(" * (  4) --- (      Gossip      ) The general gossip conference");
  2020.   prints(" * (  5) --- (   Classifieds    ) Classifieds - Buy, Sell, and/or Swop");
  2021.   prints("   (  6) --- (      Jokes       ) Joke Time. Amuse us and Yourself");
  2022.   prints(" * (  7) --- (   Find a File    ) Find a File Somewhere in RSA");
  2023.   prints(" * (  8) --- ( Talk about Comms ) Talk about teleCommunicatons");
  2024.   prints(" * (  9) --- (   C Conference   ) The Conference for 'C' addicts");
  2025.   prints("   ( 10) --- ( Science Fiction  ) Science Fiction and Fantasy conference");
  2026. } // end function xpress_c_s_d
  2027.  
  2028. xpress_c_s_s()
  2029. // this function emulates sx's list selected areas facility
  2030. {
  2031.   prints("  *-   Selected Message Areas  -*");
  2032.   prints("   ( 1) --- (Local to This BBS ) Replies to log-off messages and more");
  2033.   prints("   ( 2) --- (    Technical     ) The Technical conference");
  2034.   prints("   ( 3) --- (     FidoNet      ) FidoNet Mail area");
  2035.   prints("   ( 4) --- (      Gossip      ) The general gossip conference");
  2036.   prints("   ( 5) --- (   Classifieds    ) Classifieds - Buy, Sell, and/or Swop");
  2037.   prints("   ( 7) --- (   Find a File    ) Find a File Somewhere in RSA");
  2038.   prints("   ( 8) --- ( Talk about Comms ) Talk about teleCommunicatons");
  2039.   prints("   ( 9) --- (   C Conference   ) The Conference for 'C' addicts");
  2040.   prints("");
  2041. } // end function xpress_c_s_s
  2042.  
  2043. xpress_c_s_f()
  2044. // this function emulates sx's find an area facility
  2045. { prints("f inter");
  2046.   prints("*----------------------------------*");
  2047.   prints("     Available Message Areas");
  2048.   prints("*----------------------------------*");
  2049.   prints("");
  2050.   prints("  ( 13) --- (    Genealogy     ) The Genealogy Conference (International)");
  2051.   prints("  ( 14) --- (     Modula 2     ) For MODULA-2 addicts (International)");
  2052.   prints("  ( 19) --- (  Britain & RSA   ) Link-up Between Britain and RSA (International)");
  2053.   prints("  ( 20) --- (    Virus Info    ) Virus Information (International)");
  2054.   prints("  ( 21) --- (       HAMS       ) Amateur Radio Operators (International)");
  2055.   prints("  ( 26) --- (   CAD and CAM    ) About CAD and CAM (International)");
  2056.   prints("  ( 27) --- (   Electronics    ) The Electronics Echo (International)");
  2057.   prints("  ( 28) --- (     Science      ) The Science Conference (International)");
  2058.   prints("  ( 29) --- (   USA <-> RSA    ) USA <-> RSA chat conference (International)");
  2059.   prints("  ( 31) --- (     CD Roms      ) About CD Roms (International)");
  2060.   prints("  ( 33) --- (Clipper Conference) The Clipper Conference (International)");
  2061.   prints("  ( 34) --- ( MIDI Programming ) MIDI Programming (International)");
  2062.   prints("  ( 35) --- ( ACAD conference  ) The ACAD conference (International)");
  2063.   prints("  ( 36) --- (   MIDI Network   ) The MIDI Network (International)");
  2064.   prints("  ( 37) --- (Novell (Worldwide ) The Novell Conference (International)");
  2065.   prints("  ( 40) --- (     DesqView     ) DesqView Conference (International)");
  2066.   prints("  ( 41) --- ( LANS (Worldwide) ) Local Area Networks (LANS - International)");
  2067.   prints("  ( 42) --- (  Shortwave Echo  ) Shortwave Echo (International)");
  2068.   prints("* (211) --- (SE Users Internat ) Silver Express conference (International)");
  2069. } // end function xpress_c_s_f
  2070.  
  2071. xpress_c_s_c()
  2072. // this function emulates sx's message area change message pointer facility
  2073. {
  2074.   printsc("210 (  SE Users Local  ) Enter Last Read Msg #. <CR> Keep [   39] : ");
  2075.   gets(buffer,3);
  2076.   prints("");
  2077.   kounter = stoi(buffer);
  2078.   if (kounter >= 1)
  2079.     fputs(buffer,toes_req_file);
  2080.   else
  2081.     fputs("$ENTER$",toes_req_file);
  2082.   fputs("^M^J",toes_req_file);
  2083.   fputs("Enter Area Number(s) : ^M^J",toes_req_file);
  2084. } // end function xpress_c_s_c
  2085.  
  2086. xpress_config_keywords()
  2087. // this function emulates the keyword selection facility
  2088. {
  2089.   xpress_config_k_l();   // list all keywords defined
  2090.   do
  2091.   {
  2092.     prints("[ Options : ADD keyword, DEL Keyword, LIST-relist, <CR>-Menu ]");
  2093.     gets(buffer,80);
  2094.     prints("");
  2095.     strupper(buffer);
  2096.     if (buffer == "")
  2097.     // pressed enter with no input
  2098.     {
  2099.       fputs("$ENTER$^M^J",toes_req_file);
  2100.       fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file);
  2101.       break;
  2102.     }
  2103.     else
  2104.     if (strpos(buffer,"ADD",0) == 0)
  2105.     // wants to add keywords
  2106.     {
  2107.       if (strlen(buffer) >= 5)
  2108.       {
  2109.         fputs(buffer,toes_req_file);
  2110.         fputs("^M^J",toes_req_file);
  2111.         fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, <CR>-Menu ]^M^J",toes_req_file);
  2112.       }
  2113.       else
  2114.       {
  2115.         prints("   ADD WHAT!!!!");
  2116.         prints("<TOESREQ - Invalid syntax - should be eg. ADD ALLAN>");
  2117.       }
  2118.       continue;
  2119.     }
  2120.     else
  2121.     if (strpos(buffer,"DEL",0) == 0)
  2122.     // wants to delete keywords
  2123.     {
  2124.       if (strlen(buffer) >= 5)
  2125.       {
  2126.         fputs(buffer,toes_req_file);
  2127.         fputs("^M^J",toes_req_file);
  2128.         fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, <CR>-Menu ]^M^J",toes_req_file);
  2129.       }
  2130.       else
  2131.       {
  2132.         prints("Keyword ^"^" Not found");
  2133.         prints("<TOESREQ - Invalid syntax - should be eg. DEL ALLAN>");
  2134.       }
  2135.       continue;
  2136.     }
  2137.     else
  2138.     if (strpos(buffer,"LIST",0) == 0)
  2139.     // wants to list keywords
  2140.     {
  2141.       if (strlen(buffer) == 4)
  2142.       {
  2143.         fputs(buffer,toes_req_file);
  2144.         fputs("^M^J",toes_req_file);
  2145.         fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, <CR>-Menu ]^M^J",toes_req_file);
  2146.         xpress_config_k_l();
  2147.       }
  2148.       else
  2149.       {
  2150.         prints("<TOESREQ - Invalid syntax - should be eg. LIST - no more parameters>");
  2151.         delay(30);
  2152.       }
  2153.       continue;
  2154.     }
  2155.   }
  2156.   while(1);
  2157. } // end function xpress_config_keywords
  2158.  
  2159. xpress_config_k_l()
  2160. // this function lists defined keywords
  2161. {
  2162.   prints("*----------------------------------*");
  2163.   prints("       Selection of Key Words");
  2164.   prints("*----------------------------------*");
  2165.   prints("");
  2166.   prints("ALLAN            MARILLIER        AM               BBS");
  2167.   prints("^M^J^M^J");
  2168. } // end function xpress_config_k_l
  2169.  
  2170. xpress_config_transfer()
  2171. // this function emulates setting the file transfer protocol
  2172. {
  2173.   prints("");
  2174.   prints("*--------------------------*");
  2175.   prints("   Transfer Protocol Menu");
  2176.   prints("*--------------------------*");
  2177.   prints("");
  2178.   prints("Type");
  2179.   prints("     [X].........X-Modem");
  2180.   prints("     [Y].........Y-Modem (Xmodem 1k)");
  2181.   prints("     [Z].........Z-Modem");
  2182.   prints("     [Q].........Exit back to Configuration Menu.");
  2183.   prints("");
  2184.   prints("[72 mins] Allan, Enter Selection:");
  2185.   char = 0;
  2186.   do
  2187.   {
  2188.     char = toupper(inkeyw());
  2189.     if (char == 'Q')   // Q has same effect as Enter
  2190.       char = 13;
  2191.   }
  2192.   while (char != 'X' && char != 'Y' && char != 'Z' && char != 13);
  2193.   if (char == 13)
  2194.     fputs("$ENTER$",toes_req_file);
  2195.   else
  2196.     fputs(char,toes_req_file);
  2197.   fputs("^M^J",toes_req_file);
  2198.   fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file);
  2199. } // end function xpress_config_transfer
  2200.  
  2201. xpress_config_archive()
  2202. // though Dave only supports ZModem, this function emulates the archive
  2203. // facility
  2204. {
  2205.   prints("");
  2206.   prints("*--------------------------*");
  2207.   prints("   Transfer Archiver Menu");
  2208.   prints("*--------------------------*");
  2209.   prints("");
  2210.   prints("Type");
  2211.   prints("     [Z].........PKZip ver 1.10");
  2212.   prints("     [Q].........Exit back to Configuration Menu.");
  2213.   prints("");
  2214.   prints("[72 mins] Allan, Enter Selection:");
  2215.   char = 0;
  2216.   do
  2217.   {
  2218.     char = toupper(inkeyw());
  2219.     if (char == 'Q')   // Q has same effect as Enter
  2220.       char = 13;
  2221.   }
  2222.   while (char != 'Z' && char != 13);
  2223.   if (char == 13)
  2224.     fputs("$ENTER$",toes_req_file);
  2225.   else
  2226.     fputs(char,toes_req_file);
  2227.   fputs("^M^J",toes_req_file);
  2228.   fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file);
  2229. } // end function xpress_config_archive
  2230.  
  2231. xpress_config_graphics()
  2232. // this function emulates toggling graphics mode on /off
  2233. {
  2234.   prints("<TOESREQ : Silver Express Graphics will be toggled ......ON/OFF>");
  2235.   delay(10);
  2236.   // does nothing more - just return to calling function
  2237. } // end function xpress_config_graphics
  2238.  
  2239. xpress_config_menu_hotkey()
  2240. // this function emulates toggling hotkeys on /off
  2241. {
  2242.   prints("<TOESREQ : Silver Express Menu Hotkeys will be toggled ......ON/OFF>");
  2243.   delay(10);
  2244.   // does nothing more - just return to calling function
  2245. } // end function xpress_config_menu_hotkey
  2246.  
  2247. xpress_config_expert()
  2248. // this function emulates toggling expert / novice mode
  2249. {
  2250.   prints("<TOESREQ : Silver Express Expert Mode will be toggled ......Expert/Novice>");
  2251.   delay(10);
  2252.   // does nothing more - just return to calling function
  2253. } // end function xpress_config_expert
  2254.  
  2255. xpress_config_last()
  2256. // this function emulates sx's last usage date
  2257. {
  2258.   str last_date[10];
  2259.   str last_time[5];
  2260.  
  2261.   do
  2262.   {
  2263.     ok = 0;
  2264.     kounter = 0;
  2265.     printsc("Enter Date (format MM-DD-YY) <CR>-today's date       : ");
  2266.     gets(last_date,10);
  2267.     printsc("^M^JEnter Time (Military format HH:MM) <CR>-today's time : ");
  2268.     gets(last_time,5);
  2269.     prints("");
  2270.  
  2271.     // check for CR, and put in date and time if necessary
  2272.     if (last_date == "")
  2273.     {
  2274.       number = _date_format;
  2275.       _date_format = 0;
  2276.       date(curtime(),last_date);
  2277.       _date_format = number;
  2278.       // substitute "-" for "/"
  2279.       copychrs("-",last_date,2,1);
  2280.       copychrs("-",last_date,5,1);
  2281.     }
  2282.     if (last_time == "")
  2283.     {
  2284.       number = _time_format;
  2285.       _time_format = 1;
  2286.       time(curtime(),last_time);
  2287.       _time_format = number;
  2288.       // what about the seconds ? they're redundant !
  2289.     }
  2290.  
  2291.     // now validate them
  2292.     // date first - dashes then numbers
  2293.     if (strpos(last_date,"-",2) == 2)  // was 0 ???
  2294.       kounter = kounter + 1;
  2295.     if (strpos(last_date,"-",5) == 5)   // was 0 ???
  2296.       kounter = kounter + 1;
  2297.     // check month
  2298.     subchrs(last_date,0,2,s_10);
  2299.     if (stoi(s_10) >= 1 && stoi(s_10) <= 12)
  2300.       kounter = kounter + 1;
  2301.     // check day
  2302.     subchrs(last_date,3,2,s_10);
  2303.     if (stoi(s_10) >= 1 && stoi(s_10) <= 31)
  2304.       kounter = kounter + 1;
  2305.     // check year
  2306.     subchrs(last_date,6,2,s_10);
  2307.     if (stoi(s_10) >= 81 && stoi(s_10) <= 99)
  2308.       kounter = kounter + 1;
  2309.  
  2310.     // time next - colons then numbers
  2311.     if (strpos(last_time,":",2) == 2)
  2312.       kounter = kounter + 1;
  2313.     // check hours
  2314.     subchrs(last_time,0,2,s_10);
  2315.     if (stoi(s_10) >= 0 && stoi(s_10) <= 23)
  2316.       kounter = kounter + 1;
  2317.     // check minutes
  2318.     subchrs(last_time,3,2,s_10);
  2319.     if (stoi(s_10) >= 0 && stoi(s_10) <= 59)
  2320.       kounter = kounter + 1;
  2321.  
  2322.     if (kounter == 8)
  2323.       ok = 1;
  2324.     if (not ok)
  2325.     {
  2326.       // something wrong - give an error message
  2327.       prints("Error Type in the time form HH:MM ie, 14:52");
  2328.       prints("");
  2329.       prints("Error Type in the date form MM-DD-YY ie, 05-26-88");
  2330.       prints("");
  2331.     }  // end error message if not ok
  2332.   }
  2333.   while(not ok);
  2334.  
  2335.   fputs(last_date,toes_req_file);
  2336.   fputs("^M^J",toes_req_file);
  2337.   fputs("Enter Time (Military format HH:MM) <CR>-today's time :^M^J",toes_req_file);
  2338.   fputs(last_time,toes_req_file);
  2339.   fputs("^M^J",toes_req_file);
  2340.   fputs("Reset <S>elected or <A>ll available areas? <CR> - Skip^M^J",toes_req_file);
  2341.  
  2342.   prints("Adjusting Last Read Counters since Apr 15,1991  7:30:00am");
  2343.   prints("Reset <S>elected or <A>ll available areas? <CR> - Skip");
  2344.   prints("^M^J^M^J");
  2345.   // wait here for input
  2346.   char = 0;
  2347.   do
  2348.   {
  2349.     char = toupper(inkey());
  2350.   } while (char != 'S' && char != 'A' && char != 13);
  2351.   if (char == 'A')
  2352.   {
  2353.     fputs("A^M^J",toes_req_file);
  2354.     fputs("of a successful download for this session? y/N^M^J",toes_req_file);
  2355.   }
  2356.   else
  2357.   if (char == 'S')
  2358.   {
  2359.     fputs("S^M^J",toes_req_file);
  2360.     fputs("of a successful download for this session? y/N^M^J",toes_req_file);
  2361.   }
  2362.   else
  2363.   {
  2364.     fputs("$ENTER$^M^J",toes_req_file);
  2365.     fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file);
  2366.     return;
  2367.   }
  2368.  
  2369.   prints("Scanning Area   1 (Local to This BBS ) LastRead   87 reset to   87");
  2370.   prints("Scanning Area   2 (    Technical     ) LastRead  127 reset to  119");
  2371.   prints("Scanning Area   3 (     FidoNet      ) LastRead   72 reset to   70");
  2372.   prints("Scanning Area   4 (      Gossip      ) LastRead  184 reset to  182");
  2373.   prints("Scanning Area   5 (   Classifieds    ) LastRead   24 reset to   24");
  2374.   prints("Scanning Area   7 (   Find a File    ) LastRead    3 reset to    3");
  2375.   prints("Scanning Area   8 ( Talk about Comms ) LastRead  126 reset to  124");
  2376.   prints("Scanning Area   9 (   C Conference   ) LastRead    9 reset to    9");
  2377.   prints("Scanning Area  11 (Pascal Conference ) LastRead   14 reset to   14");
  2378.   prints("Scanning Area  15 (DataBase Languages) LastRead   18 reset to   17");
  2379.  
  2380.   prints("Do you wish to permanently save these number regardless");
  2381.   prints("of a successful download for this session? y/N ");
  2382.   char = 0;
  2383.   do
  2384.   {
  2385.     char = toupper(inkey());
  2386.   }
  2387.   while (char != 'Y' && char != 'N');
  2388.   if (char == 'Y')
  2389.   {
  2390.     fputs("Y^M^J",toes_req_file);
  2391.     fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file);
  2392.   }
  2393.   else
  2394.   {
  2395.     fputs("N^M^J",toes_req_file);
  2396.     fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file);
  2397.   }
  2398. } // end function xpress_config_last
  2399.  
  2400. xpress_config_your()
  2401. // this function emulates sx's receive own mail facility
  2402. {
  2403.   prints("<TOESREQ : Silver Express Your Mode will be toggled>");
  2404.   prints("......Receive Own Mail/Skip Own Mail");
  2405.   delay(10);
  2406.   // does nothing more - just return to calling function
  2407. } // end function xpress_config_your
  2408.  
  2409. wait_for_enter()
  2410. // this function causes a wait for Enter to be performed
  2411. {
  2412.   char = 0;
  2413.   do
  2414.   {
  2415.     char = inkeyw();
  2416.   }
  2417.   while (char != 13);
  2418. } // end function wait_for_enter
  2419.  
  2420. msg_fil_area()
  2421. // this function is used by both message_area and file_area, to eliminate
  2422. // duplication of common code used in accepting an area number, or
  2423. // accepting N, n, P, or p to move the area pointer. It uses the global
  2424. // variable area_type as either "f" or "m" to determine what it's working on
  2425. {
  2426.   if (area_type == "m")
  2427.     prompt = "Message area [Area #, N)ext, P)rior, ?)list]:^M^J";
  2428.   else
  2429.     prompt = "File area [Area #, N)ext, P)rior, ?)list]:^M^J";
  2430.   do
  2431.   {
  2432.     if (area_type == "m")
  2433.       prints("Message area [Area #, N)ext, P)rior, ?)list]:");
  2434.     else
  2435.       prints("File area [Area #, N)ext, P)rior, ?)list]:");
  2436.     // wait for input. If Enter, or ?, display the list of areas ...
  2437.     kounter = gets(s_10,3);
  2438.     number = stoi(s_10);
  2439.     if (number != 0)
  2440.     {
  2441.       if (area_type == "m")
  2442.         m_area_number = number;
  2443.       else
  2444.         f_area_number = number;
  2445.       fputs(s_10,toes_req_file);
  2446.       fputs("^M^J",toes_req_file);
  2447.       if (area_type == "m")
  2448.         fputs(message_prompt,toes_req_file);
  2449.       else
  2450.         fputs(file_prompt,toes_req_file);
  2451.       break;
  2452.     }
  2453.     if (kounter == 0 || s_10 == "?")  // ie also send Enter as ?
  2454.     {
  2455.       fputs("?",toes_req_file);
  2456.       fputs("^M^J",toes_req_file);
  2457.       fputs(prompt,toes_req_file);
  2458.       if (area_type == "m")
  2459.         message_area_show();
  2460.       else
  2461.         file_area_show();
  2462.       continue;
  2463.     }
  2464.     if (s_10 == "N" || s_10 == "P" || s_10 == "n" || s_10 == "p")
  2465.     {
  2466.       fputs(s_10,toes_req_file);
  2467.       fputs("^M^J",toes_req_file);
  2468.       if (area_type == "m")
  2469.       {
  2470.         fputs(message_prompt,toes_req_file);
  2471.         if (s_10 == "N" || s_10 == "n")
  2472.           m_area_number = m_area_number + 1;
  2473.         else
  2474.         {
  2475.           m_area_number = m_area_number - 1;
  2476.           if (m_area_number <= 0)
  2477.             m_area_number = 1;
  2478.         }
  2479.       }
  2480.       else
  2481.       {
  2482.         fputs(file_prompt,toes_req_file);
  2483.         if (s_10 == "N" || s_10 == "n")
  2484.           f_area_number = f_area_number + 1;
  2485.         else
  2486.         {
  2487.           f_area_number = f_area_number - 1;
  2488.           if (f_area_number <= 0)
  2489.             f_area_number = 1;
  2490.         }
  2491.       }
  2492.       break;
  2493.     }
  2494.   } while (1);
  2495. } // end function msg_fil_area
  2496.  
  2497. get_protocol()
  2498. // this function gets the file transfer protocol - to avoid duplication
  2499. // of code in both file_upload and file_download
  2500. {
  2501.   ok = 0;
  2502.   do
  2503.   {
  2504.     clear_scr();
  2505.     prints("");
  2506.     prints(" Z)modem");
  2507.     prints(" X)modem");
  2508.     prints(" Y)xmodem/1k");
  2509.     prints(" M)odem7");
  2510.     prints(" S)ealink");
  2511.     prints(" K)ermit");
  2512.     prints(" Q)QUIT    (cancel the transfer)");
  2513.     prints("^M^J^M^J");
  2514.     prints("Select:");
  2515.     char = inkeyw();
  2516.     if (char == 13)
  2517.       char = "q";
  2518.     char = toupper(char);
  2519.     if (char=="Z" || char=="X" || char=="Y" || char=="M" || char=="S" || char=="K" || char=="Q")
  2520.       ok = 1;
  2521.   } while (ok == 0);
  2522.   protocol = char;
  2523. } // end function get_protocol
  2524.  
  2525. valid_number(int lower, int upper)
  2526. // function to get a number between the upper and lower limits passed
  2527. // s_80 and number are global variables, so I don't need to return them
  2528. {
  2529.   number = lower - 1;
  2530.   do
  2531.   {
  2532.     gets(s_10,3);
  2533.     if (strlen(s_10) == 1 && s_10 == '0')
  2534.       number = 0;
  2535.     else
  2536.       number = stoi(s_10);
  2537.     if (number == 0)
  2538.       s_10 = "0";
  2539.     if (number < lower || number > upper)
  2540.       printsc(" INVALID ! must be between ");
  2541.       printn(lower);
  2542.       printsc(" and ");
  2543.       printn(upper);
  2544.       prints("");
  2545.   } while (number < lower || number > upper);
  2546. }  // end function valid_number
  2547.  
  2548. valid_choice(int one, int two, int thr, int fou, int fiv)
  2549. // function to get a Y or N response.
  2550. {
  2551.   int ch;
  2552.   do
  2553.   {
  2554.     ch = toupper(inkeyw());
  2555.   }
  2556.   while (ch != one && ch != two && ch != thr && ch != fou && ch != fiv);
  2557.   s_10 = "^^";   // must use 2 ^ symbols, as first is seen as control char
  2558.   itos(ch,s_80);
  2559.   strcat(s_10,s_80);
  2560.   // the reply is got via inkeyw, which operates on int only. Telix doesn't
  2561.   // appear to have a means of converting int to character, so rather than
  2562.   // write a function, I let Telix send ^xxx which sends the character
  2563.   // equivalent of ASCII char xxx.
  2564. } // end function valid_choice
  2565.